2

I am very new to QGIS, so please excuse me if my question seems stupid to you. I have a small question regarding setting manually colors for points and lines. I have a bunch of nodes and vertices to display in different colors. I have written a script in VBA which at the end exports some data to KML (works in google earth, however there are other issues). I have already read that there is limited support for KML (especially with regard to styles) so I tried switching to GML. However QGIS doesn’t seem to respect the manually defined colors. This is an extract from the generated file:

<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=""
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:featureMember>
<ogr:gml fid="gml.0">
<ogr:geometryProperty><gml:Point  srsName="EPSG:4326"><gml:coordinates>-88.95786,37.79588</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:col>>#00248F</ogr:col>
<ogr:Name>S_0018302310</ogr:Name>
<ogr:Description></ogr:Description>
</ogr:gml>
</gml:featureMember>
</ogr:FeatureCollection>    

QGiS Displays the respective Nodes and Vertices but does not respect the defined Color.

At the end of the day I only need to display multiple graphs (about 200 with approx 20 nodes each) with multiple colors (colors are randomly generated, nodes and verices should have the same color) on a map. If none of the file formats is suited for this task, maybe you could propose another procedure.

2 Answers 2

2

Could it be due to the typo in the line:

<ogr:col>>#00248F</ogr:col>
0

Colours to be used with layers can be stored in qml or sld files.

Since you are doing it programmatically, you can create the qml file and the QGIS project file as well by VBA. They are simply text-only XML files.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.