Problem: Merging two maps

Hello,

I want to make a map for a Garmin device with OSM. But I have a problem to merge two maps. I search an answer on the internet and try a lot of things, but nothing helps. I hope I will find here an answer.

First, I give the programs that I use to make my map (OS = Windows 7):

  • Java OpenStreetMap Editor (JOSM) - version 3701

  • Mkgmap - R1625

  • MapSetToolKit - v1.77 (with cGPSmapper - v02.5.2 loaded)

  • MapSource - version 6.16.3

The way to create my (merged) map:

  • I download two maps on OpenStreetMap.org. I name them ‘map1.osm and map2.osm’

  • I open JOSM, en open map1.osm

  • I open map2.osm, and merge this with map1.osm (in window ‘layers’)

  • I save the merged maps as map12.osm

  • I want to convert the osm-map to a img-map. Therefore I use Mkgmap, where I give the command ‘mkgmap.jar map12.osm’. I get now the file 1234578.img

  • I use MapSetToolKit to be able to open my map in MapSource

When I open my created map in MapSource, I see only the map that I merged as last in JOSM (map2.osm).

Even when I don’t use JOSM, but merge the two maps with MapSetToolKit or GmapTool (v057a), I will see only one of the two maps.

Making the maps transparent (with Mkgmap) before merging them doesn’t help.

I hope somebody can help me with this.

If the merging of the two maps does not work, you could choose a larger map and apply a border polygon to cut out the whole area you need.

Markus

Thanks, Marcus.

But I have read that the maps that can be convert in MkgMap have a limited sizes. So, if I want to make a big map (of a country), this will give problems. (Maybe there are alternatives for MkgMap. I have to search them)

A second problem can be that there are a limited number of nodes that can be downloaded from OpenStreetMaps.org (You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm). Maybe for this, there is an alternative (planet…osm), but I didn’t try it yet.

Oh, it’s more than a year now that I used mkgmap, so I am not up-to-date. Mkgmap has been developed further since that time.

What map area would you need? I once tried to merge Germany and Switzerland. That lead to problems because a lot of nodes (at the common border of the two states) were not unique anymore. For this reason, I took europe.osm and cut out the desired area by myself.

Markus

I think the problems with merging in JOSM, is because the merged .osm file has multiple tags. Which I think is not valid, and Mkgmap just uses the first one of these?
You could try running Mkgmap with the --ignore-osm-bounds option, and see if it makes any difference.
See this thread from the Mkgmap mailing list: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2009q3/002567.html Though that was over a year ago, so I don’t know if Mkgmap has been changed to fix this since then.

Though if you are downloading large areas (eg whole countries), you should not be using the main API for this anyway. See http://wiki.openstreetmap.org/wiki/API_usage_policy
Instead, you can use Planet extracts. Geofabrik provide extracts for most countries in Europe, plus some areas within them. If you only want to use part of that area, you can use Osmosis to extract an area from it. And if its still a large file, you can use Splitter to split it into multiple tiles. Then use Mkgmap to generate your map from these.

Vclaw,

Thank you for the information. With the command 'mkgmap.jar --ignore-osm-bounds NameMap.osm, the problem is solved. Will have this setting implications to the ‘routing’ of the merged map?

I don’t want to use OpenStreetMap.org to download large areas (Therefore I use InformationFreeway.org). The aim of merging maps is to create a map of a part of the Vosges. In combination with SRTM, I want to create a topographic map for using it in my Garmin to make walks in the mountains. But good to know that it isn’t allowed to use it for large areas. (BTW, what is an API? Is it the port where you download the data?)

Concerning Osmosis: I tried to use it, but I failed :wink: Due to my limited knowledge about commands, I already give it up during the setup of the program :wink: