2

We have a huge KML file having Placemarks which contain SimpleData elements.

We need to filter the elements for a value inside SimpleData and create a folder to group all the related Placemarks inside.

Is there a tool or editor which could perform it?

1

A few options I can think of, though no tools that make this super easy...

A Python script could be a good option if you want to stick with KML all the way through. You could write a script that parses through your file, sorts based on your SimpleData attribute, and applies folders as desired. Probably easiest in Python, due to the available KML libraries and toolsets.

QGIS is another option. It's probably easier, especially if you have some GIS experience and are not into scripting/programming... though you might need to convert to Shapefile format first, do your analysis, and then export back to KML. With QGIS, general steps would be to open the KML (convert to SHP if necessary), confirm that the attribute table imported correctly and looks as you expected, sort or otherwise arrange the table based on your desired attribute, and then export to KML. I don't remember if the KML export tool includes a way to group by folder. If not, then you'll probably want to select each sub-set, export it to a separate KML, then open all the resulting KMLs in Google Earth, put them in a over-arching folder and save that out as one KML file.

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.