Welcome, Guest. Please login or register.

Login with username, password and session length
Forums Search:  


Author Topic: How to convert KML to OSM or .mp  (Read 348 times)

staggart

  • Jr. Member
  • **
  • Posts: 6
  • Karma: 0
    • View Profile
How to convert KML to OSM or .mp
« on: January 09, 2018, 02:32:13 PM »
I have done a bunch of searching and have found no definitive results.  Short story is I want to take KML files (from google maps) and produce either and OSM file or a .mp (polish) file and then run mkgmap to make maps.  I was wondering if there is an existing application to do this or if there are any code libraries (any language acceptable) to do the same.  I don't necessarily need full-on KML conversion.  I am looking to convert tracks and simple polygons to OSM/mp.  I am about to write code in python to do what I need and would love to save time or get ideas from existing code.  Hopefully, I have missed some obvious way to do this... Thanks.

eaparks

  • Sr. Member
  • ****
  • Posts: 150
  • Karma: 8
    • View Profile
Re: How to convert KML to OSM or .mp
« Reply #1 on: January 10, 2018, 08:50:17 PM »
Save the .KML Google Map files; use GPSBabel and batch convert the .kml files to a .gpx file; Add the newly created .gpx file into GPSMapEdit and save as an .mp (polish) file.

As far as the polygons your wanting to create, you are probably already familiar with it, but in case your not.  Create a track/path in Google Earth around what your wanting to be a polygon , save as a .kml file, treat the track/.kml file just like any other file up to the point you add it to GPSMapEdit then "convert to" a polygon instead of a polyline.

Instructions are here on GpsFileDepot for GPSMapEdit if your not familiar with it.  Look in the instructions for Creating Maps.  GPSBabel is pretty well self explanatory.

There are other ways to accomplish the same thing by first converting to a .gpx file but the above way is the way I continue to do it from many years ago, was about the only way to do it 10 years ago.
« Last Edit: January 10, 2018, 09:13:41 PM by eaparks »

 

anything