Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a route using Google Maps and exported it as a KML file. I would like to import now this KML file into OsmAnd so I could check where I am.

So far I found out that it is possible to create a map from a KML file with theOsmAndMapTileCreator program. However, I cannot find one, all I have is OsmAndMapCreator -- and this program does not allow me to import KML in the first place (at least I don't see such option at all). Thus, I cannot prepare a map for OsmAnd (from KML; in general I prepared regular OSM map for OsmAnd using this program).

Since I didn't find any working solution with true off-line KML route imported, I use Google Maps with a pre-loaded route. There is a catch though - if I forget it is cached, and I switch anything in Google Maps I will lose this route when biking. So it is not reliable enough -- just workaround.

The bottom line is -- I have KML file, I have OsmAnd, I would like to import the former into the latter. How do I do it?

share|improve this question
Sorry, but arbitrary bolding and italicizing make posts harder to read. There is no reason to do it all over the place like you did, especially having an entire paragraph in italics. People are perfectly capable of reading and understanding normally formatted text just fine, but if you're going to use formatting at least try to be a little judicious. Please also refrain from posting commentary/discussion in your question. – eldarerathis Sep 29 '12 at 2:26
@eldarerathis, "arbitrary bolding and italicizing make posts harder to read" -- any hard data to back up this statement? – greenoldman Sep 29 '12 at 6:19
I don't know about "hard facts" but it's generally accepted convention to avoid using large areas of italics since it doesn't aid the reader (it's not marking key phrases, it's purely stylistic) and it's often particularly more difficult for visually impaired individuals to read. One opinion, second opinion... – eldarerathis Sep 29 '12 at 14:41
...and from Wikipedia: "Regular upright type (roman type) is found to be more legible than italic type". I wouldn't be surprised if there's scientific research regarding this, but you might have to pay for the info since many researchers and publications require subscriptions or other fees. – eldarerathis Sep 29 '12 at 14:42
up vote 5 down vote accepted

I almost forgot about my own question, meanwhile I found perfectly working solution -- simply converting KML into GPX with GPSBabel:

It is open source, which is great plus for me.

share|improve this answer
Does your resulting .gpx have accurate trackpoints every few meters or is it very sparse (containing only basic turn-by-turn points and such)? I thought this might be the case with Google's regular kml export. – ce4 Dec 29 '12 at 12:42
@ce4, I am not an expert, however I went on a ride on my bicycle and I was 100% fine with me. It helped me navigate in forest (almost no marks on trees), and on regular roads. – greenoldman Dec 29 '12 at 21:06
I'm OK with this answer! Seems like the default export is accurate enough or Osmand handles it just fine (by locking the the missing parts of the route to its internal database ways). I'll try it myself and post my findings... – ce4 Dec 29 '12 at 22:30

Try using JOSM and OpenData plugin. To install it just go to preferences(F12)->plugins->search "opendata" and install. After importing you can (as far as I know) save it as *.osm, and then use OsmandMapCreator

share|improve this answer

I use GMap2GPX.

It loads some JavaScript into the running tab to do all the work. It's fairly easy to use, just follow the instructions on the site. Use "extract full" to generate a reasonably accurate .gpx file (the basic file just has turn-by-turn instructions and little data besides).

Note: Only use it in an incognito instance for added privacy. You must not be logged into Google using Chrome (or it won't work for security reasons). Just launch an incognito instance via "ctrl+shift+N" and do it again there.

share|improve this answer

As for using another app , Google Earth can help.

As for still sticking to OsmAnd , it depends on your program design . If OsmAnd is your project , you may consider creating a file stream to open the KML files else, passing the intents with the KML file

share|improve this answer
Thanks, but this is not StackOverflow, so I am not asking how to write a program. This is Android forum and I am asking how to use program. – greenoldman Sep 29 '12 at 6:20

Since osmand is about offline maps, I'd like to provide an "offline" solution as well. Basically, you want to convert the kml file to gpx format, and make the gpx file available to osmand.

You can use gpsbabel to convert the kml file to gpx, which is free/open-source, and is available for most platforms, and is probably in the main repository of your favourite linux distro. On linux, it's as easy as running the following command, changing out file.kml and file.gpx for your filenames:

gpsbabel -i kml -f file.kml -o gpx -F file.gpx

You can then put the gpx file in the /sdcard/osmand/tracks/ directory on your Android device, and osmand will make it available to display, etc.

share|improve this answer

Your Answer


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.