0

I have a shapefile that I would like to export into a kml to share it with my colleagues.

This shapefile contains a few hundred polygons. I have QGIS 2.2.0 on Windows 7.

I would like to create a kml that somehow keeps the same style as my shapefile. Indeed, in QGIS, I have a simple category style applied to a certain field ("Soil Type"). When I export the shapefile as a kml (after renaming the "Soil Type" field as "Name" to have it as a title of my kml polygons), the kml created doesn't have any sub-folders per Soil Type. As a result, if I want to set a color per Soil Type, I need to manually create folders in Google Earth, move every single polygons into the different new folders, then apply a style to the folders. It works, but it takes a long time when you have a lot of polygons. Another solution I found is to create a different kml of each "Soil Type" in QGis. But again, it's not very efficient.

Is there any solution more efficient to organize the kml created from a shapefile in QGIS?

1

There is some new functionality for kmls in QGIS which I haven't tried. But along your existing skill/workflow, you should try exporting separate kmls and then bring them together in a folder in GE.

Firstly select subsets of your data in QGIS based on Soil Type etc. Then Save Selected As

Style each of the kmls in GE, then bring them together in a new folder. You may have to experiment with how the folder hierarchy works in GE as it may try to force the style to override all in the folder with certain hierarchy combinations. Save as a new kml.

This works OK with not too many subsets....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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