Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
1  
I'll post a more thorough answer later, but this should help get you started, code.google.com/apis/kml/documentation/kmlreference.html#folder –  Andy W May 14 '11 at 1:33
    
@Andy W I see. Is there some GUI software solution that let's me do this? Looking forward to your answer/help. Thanks in advance. –  hpy May 14 '11 at 2:17

1 Answer 1

up vote 2 down vote accepted

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!

share|improve this answer
    
I'll try to soon and report back. Thanks! –  hpy May 14 '11 at 14:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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