labelkmlqgisgoogle-earthkmz

Displaying labels of polygons of a kml file in google earth


I want to have the names of the polygons of kml file, displayed in google earth.

I converted the kml file from a shapefile in qgis. The kml file is loaded normally, i can see the name and the description in the list on the google earth panel. I cannot see it on the map though. How can I visualize the names?

I know that i can create a second kml file with points and have those displayed but I need to have one single file for all.

How could I do that?

Thank you


Solution

  • If you don't want to use a 2nd KML file for the centroid points + labels, then you can take your original KML file, wrap each polygon in a MultiGeometry tag, and add the polygon's centroid Point feature into each MuiltiGeometry. Then you can have the labels on those points, and have them be part of the same file as the polygons. Unfortunately I don't know of any easy way to create such a thing in QGIS, so you're probably left with hand-editing or programatically generating the KML.