Skip to main content

How can I Convert an esri feature class to a KML and assign colors based on the attributes in the feature class

 

I have some line feature classes (roads) which have a condition rating and a color based on that rating.

i would like to convert these feature classes to KML and assign them colors based on the condition rating.

 

You can use the KMLStyler to assign colours to features, the colour can come from an attribute, so you can use a conditional attributeCreator or an AttributeValueMapper to assign the colour code based on the condition rating.

 

 

Then just send the features to a Google KML writer.

As explained by @jdh using UK's OS Open Roads data:

Use a KMLPropertySetter to change the labels and the balloon text (= pop-up).


As explained by @jdh using UK's OS Open Roads data:

Use a KMLPropertySetter to change the labels and the balloon text (= pop-up).

Then use the KMLPropertySetter to give your features a kml name, so that the labels are more interesting (like Road Names).

 

 


Reply