2007-02-18

Converting Google Earth KML files To Other Mapping Formats

Here's a tutorial on how to convert the tracks you can download here to other mapping formats, including Garmin. It's actually very easy to do, with the right tool.

To get the right tool, go to www.GPSbabel.org and download the GPSbabel tool. Just follow the "downloads" link on the left hand side. Pick the file for your computer, DMG for Mac or Zip for Windows, and download to your computer.

Oh, and if you share my inability to spell, it's GPSbabel, not GPSbable.

There are too many variables for me to describe exactly how to install in every possible situation, but if you're running WinXP or OSX, you should just be able to double-click the downloaded file, then go into the folder that opens and double-click the application. If this doesn't work, then I suggest you back up and read the documentation on the GPSbabel site. If you still have install problems then leave a comment with your particulars and I'll try to help.

GPSbabel converts tracks and waypoints between mapping formats, lots and lots of different formats. Think babel-fish in the Hitchhikers Guide to the Galaxy series, but then if you understand this reference you're probably so much of a geek that you don't need this tutorial :)

Anyway, with GPSbabel running, just pick the file format you want to start with, browse to the actual file, pick the file format you want to finish with, and hit "Save File" - that's it. Oh, don't forget to pick what you wanted translated: points, tracks, or routes. Supposedly, it can even send and receive files directly to many different GPS receivers, though I've not tried this.

Personally, I use an older less-crippled lite version of OziExplorer for communication with my GPS. I have Garmin's Mapsource but I never use it for tracks or waypoints, basically because it's pretty substandard compared with Ozi. I recognise that many people don't use Ozi so I'm also converting and uploading to Google Earth KML format.

So, to use the tracks I have available for download:
  1. Follow the blog links here to get to the KML files.
  2. Download the file. If you use IE (which I don't recommend) you will have to right-click on the KML file and choose "save target as."
  3. If you have Google Earth installed (which I do recommend) you can then double-click on the downloaded KML file and it should open in Google Earth.
  4. If the track looks interesting to you, then continue through with the conversion.
  5. Start GPSbabel.
  6. Browse to the KML file. It should automatically change the input file type to Google Earth.
  7. Choose your output type or just select your GPS receiver.
  8. Either hit "Save File" or "Send GPS", depending on what you selected.
And that's it.

If you have any questions about this then leave a comment. I'll do my best to help out,

David...

Download links: GPSbabel, OziExplorer, Google Earth

NOTE: the KML track problem should be fixed (Thanks to David for pointing this out)

6 comments:

David said...

David,

For some reason Babel doesn't like converting from KML to Mapsource, but because you also put up the Ozi file, I was able to convert that. Thank you for your help. I tried Babel before but the KML files just convert to a single point, not a track.

Dave

Dave said...

Hi,

I've just completed some testing and, why yes, it appears that my KML files are not GPSbable compatible. The program I've been using to convert from Ozi to KML, Ozi Map Converter, must be doing something that GPSbable doesn't like. My KML files open fine in Google Earth, but don't convert. However, if I convert from Ozi to KML via GPSbable, the KML file will convert back to Garmin Mapsource fine.

Thank you for pointing this out. I'll be repairing all the KML files shortly (and I'll post another comment here when I'm done).

David...

Anonymous said...

I found your blog via a Google search and thought that maybe you could help me. I'm trying to put WMA boundaries on my eTrex Legend via MapSource. Here is what I have done:

1. Download KY WMA Boundaries at:
http://fw.ky.gov/kfwis/google/GoogleEarth.asp (Ky Public Hunting Areas.kmz)

2. Unzip the kmz file and extract the kml file using Winzip.

I've tried converting the resulting kml file using several different programs (GPSBabel, GE2GPX, etc.) and they all produce output that consists of hundreds of "tracks" that are composed of a single coordinate for each WMA.

I don't get it, because in Google Earth the WMA boundaries are perfect. Any ideas?

Dave said...

Well, if they're having the same issue as I had, where their conversion software is generating non-standard KML, then you have 3 options:

1) contact them and hope they fix the problem, like I did.

2) futz around to see if you can find some conversion software that works, as it seems you are doing.

3) resort to brute-force.

The brute-force method is to bring up the KML document in Google Earth and then just trace it out to a new track. Then, you can save this track as KML (hopefully properly formatted) and convert it via GPSBabel. If the data you want is not overly complex, it should only take a few minutes to trace out.

It's like the workshop. Sometimes having at it with simple hand-tools is way faster than setting up some complicated machine to "do it right." How much time have you spent on this so far?

Dave said...

P.S. In thinking more about this, the first thing you should verify is that you can, in fact, create a track in Google Earth, export it, and convert it. If that doesn't work, then you are doing something wrong. Something like not choosing "tracks" from the GPSBabel menu, for example.

Anonymous said...

Hello there! You might find this tool http://kml2gpx.com/ to be useful when trying to convert Google Earth kml files to gpx. It also works the other way around. Installation isn't required.