[Gdal-dev] RE: ogr2ogr KML styling
Randy George
rkgeorge at cadmaps.com
Wed Feb 14 13:47:40 EST 2007
Hi,
I am experimenting with kml output for example:
"E:\Program Files\FWTools1.1.3\bin\ogr2ogr" -f KML
D:\CookInlet\Cook-Inlet\test.kml D:\CookInlet\Cook-Inlet\Seismic_lines.shp
The resulting set of kml <Placemark> looks like this:
.
.
<Placemark>
<description><![CDATA[
<b>DESCRIPTIO:</b> <i>293U-39</i><br />
<b>SHOTBY:</b> <i>OIL COMPANY</i><br />
]]>
</description>
<LineString><coordinates>-152.11768673515135,60.589764421552438
-152.11540114261703,60.592063085951288 ...</coordinates></LineString>
<Style>
<LineStyle>
<color>ff0000ff</color>
</LineStyle>
<PolyStyle>
<fill>0</fill>
</PolyStyle>
</Style>
</Placemark>
This seems fine except that the default linestyle width doesn't show up on
my GoogleEarth view. I can manually add <width>4</width> to correct the
problem, but is there a way to change kml style output in ogr2ogr?
I could resort to a java runtime.exec() with a STDOUT => XMLReader but
wondered if there was a way to merge a style definition file using ogr2ogr.
Perhaps an xslt approach would be better.
Thanks
randy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070214/30a9deba/attachment.html
More information about the Gdal-dev
mailing list