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 866 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 »

EL34

  • Jr. Member
  • **
  • Posts: 20
  • Karma: 0
    • View Profile
Re: How to convert KML to OSM or .mp
« Reply #2 on: August 07, 2018, 11:33:23 AM »
I use this site for many types of conversions
http://www.gpsvisualizer.com/

Also adding elevation to .gpx tracks that don't have it

The site has many cool conversions

Everything ends up getting added to my custom maps in GPSmapedit
Then converted to a Gamin .img file using cGPSmapper

As far as OSM, I edit my own OSM data using JOSM
You can save that as a osm file

If you register with OSM, you are then allowed to edit OSM maps
There are 3 ways to edit the OSM map data

JOSM allows you to add .gpx track data to the main map layer and then upload it
https://josm.openstreetmap.de/

The screen shot below shows the edit menu
« Last Edit: August 08, 2018, 03:21:49 AM by EL34 »