[gdal-dev] Colors and KML output

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Tue Oct 29 15:10:57 PDT 2013


Tim Keitt <tkeitt <at> utexas.edu> writes:

> 
> I'd like to set the color of line segments individually according to a
field in KML output. Is that possible? Seem it only outputs red. I can
change that globally, but not easily for many line segments.
> 
> 
> 
> Looking at the driver code, there is some code there to handle colors. I
have no idea how to attach a color table to an ogr layer. Any hints on how
this works?

Have a try by adding an OGR_STYLE column and fill the colours for the
features as described in 
http://www.gdal.org/ogr/ogr_feature_style.html

I have never tried that myself but perhaps it works.

-Jukka Rahkonen-



More information about the gdal-dev mailing list