Recently I was working with some data layers in QuantumGIS, playing to decide the proper color combination for my visualization. The result had to be presented in a web environment using OpenLayers.
The point is. I define and check the visualization in Qgis, and then I want to export the results to be served as a OpenLayers Vectorlayer, or as a Mapserver layer. Of course, with the color defined in Qgis.
Openlayers and Mapserver give the option to read the color from an attribute value (here and here). Maybe there is an easier way, but in this case I developed a small plugin to export the current visualized color into a specific layer attribute.
Screenshots
- Color to Attribute – Icon in Qgis main screen
- Main window of the plugin. Select layer and attribute
- Creating a new attribute to fill with the color value
- Feature list after adding the new attribute