I have styled my point data with circle and red color symbology. Is there any way to retain the points color when saving layer to KML?
Currently when saved and open in Google Earth, it only shows as a pin.
I have styled my point data with circle and red color symbology. Is there any way to retain the points color when saving layer to KML?
Currently when saved and open in Google Earth, it only shows as a pin.
QGIS has the option to export styles with kml format, but this option doesn't work with points. Here's why:
When you export a point layer with red circle symbology as KML, the symbol section of the KML file looks like this:
<Style id="style1">
<IconStyle>
<Icon>
<href>http://maps.gstatic.com/mapfiles/ms2/micons/red-dot.png</href>
</Icon>
</IconStyle>
But it should look like this:
<Style id="style1">
<IconStyle>
<color>ff0000ff</color>
<scale>1.2</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png</href>
</Icon>
</IconStyle>
</Style>
This is a known issue in QGIS. Based on the discussion under the bug report, it doesn't look like anyone is working to fix this issue. Keep in mind that QGIS is a free, open-source program developed by programmers who volunteer their time or are paid by donations. If this issue is important to you, you can work on fixing it yourself, hire someone to fix it, or start a crowd-funding campaign to hire someone to fix it.
The MMQGIS plugin provides another way to export a KML file, but it also uses the default Google Earth symbology. You could ask the developer of that plugin to add point symbology as a feature.
Otherwise, you're left with either changing the symbol and color in Google Earth, or editing the KML file. You can edit it manually in Notepad++ or similar program. See the KML Reference guide for details on syntax. For batch processing, it might be more efficient to write a simple script in your code of choice.