[GIS] Select more than one place at a time in Google Earth

googlegoogle earthgoogle mapskmzplaces

I've got a Google Earth .kmz file opened in my copy of Google Earth 6.0.1.2032 running on Mac OS X 10.6.7. There are about 5000 points/"places" in the file and they show up fine.

What I would like to do is create folders in Google Earth for those points to categorise them. Unfortunately, I noticed that the Google Earth interface does not let me select more than one place at a time!

Is there another solution for me to manage and categorise those 5000+ places in the .kmz file other than drag and dropping them individually into folders in Google Earth?! (I really don't want to have to do that!) Thanks.

Best Answer

If you have your placemarks in order in the kmz file, the task will be fairly simple (and can be accomplished in a text editor). Either save the placemarks as a kml file (right click and "Save place as"), or change the file extension of the kmz file to zip and extract the zip file (a kmz file is simply a zipped up kml file(s)).

Here you can open up the kml file with any text editor. After figuring out what placemarks you want to be included in each folder, simply place the following text before the first placemark that you want to be included in the folder (here is the KML reference page);

<Folder>
  <name>MYFOLDER_NAME</name>
  <Placemark>

Then when you find the last placemark you want to be included in that same folder, place the closing folder tag;

  </Placemark> 
</Folder>

Then repeat until you have all your placemarks in folders as desired. Tedious, but if a one time job and you only need a few folders, it shouldn't take more than a few minutes copying and pasting into the appropriate spots.

If your kmz file is not sorted appropriately, this won't work. If that is the case, you need to either sort the file before its creation, or utilize other software to read in the kmz file and sort it. If you have access to ArcGIS, you can use a tool to change the kml file to a shapefile, then sort the shapefile accordingly in ArcMap, and then export the KML file. ArcMap has built in functionality to do this, but this script has worked incredibly well for me in the past (Export to KML). If you don't have access to ESRI products, you will have to ask someone else besides me how to sort the placemarks in the KMZ file!

Related Question