v.out.kml - A shell script to generate KML files (Google Earth) from GRASS vector layers.
(GRASS 6 Vector Program)
v.out.kml lots of flags and parameters... use "v.out.kml help" for details
v.out.kml creates KML files from GRASS vector data,
including color, fillcolor, transparency and icons.
If no parameters are provided, v.out.kml will ask for the source vector layer and all other parameters.
The script allows to select wether polygons will be reduced to lines or kept as polygons.
Transparency values can be set seperately for both lines and polygon area fills.
Icons for point data can be referenced by ID numbers from the Google Earth web site or by individual URLs.
The color values can also be randomized. The random-color-flag overrides any additional color settings.
The script only works for data layers of the current mapset. If "user" is the current mapset, trying to access vectors from other mapsets (like "PERMANENT") will cause ungraceful script termination.
The scrip requires an installation of GDAL/OGR supporting GML (Geographic Markup Language). If for some reason this is not available, or the local GDAL/OGR does not provide GML, install the famous FWTools from http://fwtools.maptools.org. They provide GML support. To point the script to such a FWtools installation, use the ogrpath-parameter (pointing to ogr2ogr in FWtools). Once started with this option, the script will remember the path for the current mapset, so this ordeal is only necessary once.
Currently lacking database support for point data (color/transparency)
The same random value will be applied to all instances of a [transparency|geometry]-class.
This is a humble shell-script. It will be certainly out-performed by the mightily improved next version in C.
There might be a slight offset between the generic EPSG 4326 and the "lat lon" used by Google Earth. The author would be grateful for feedback on this issue.
Last changed: $Date: 2007/17/06 $