I would like to extrude shapefile polygons to a KML based on a value stored in the attribute table. I am hoping to do this using open source software (QGIS, FWTools, GDAL, etc.). I looked at ogr2ogr using the -zfield option, but the polygons were not extruded as a KML, they were just an outline.
Any help would be appreciated,
Thanks…
Best Answer
You can use a specific column for extruding a shapefile to a kml using GDAL's ogr2ogr utility, but only if it's been compiled with libkml support. If it's been compiled with libkml support, that will become the default KML driver.
So you can try the following, first specify the zfield to be used in an environment variable, then run the ogr2ogr utility:
...where
zfield
is the name of the actual column that contains the z valuesThen there is also the creation option available for the regular KML driver, but this doesn't specify a field for extrusion, only the altitudeMode:
The other
AltitudeMode
options are in the link I gave there, but the default isrelativeToGround
.