You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2014-08-05 17:22:58

Rovani
Member
From: Netherlands
Registered: 2014-08-05
Posts: 2

Merging 2 img-maps together

I am a newbe and i have tried to merge 2 img files together with this command:

mkgmap --gmapsupp gmaps_NL.img gmaps_BE.img

The result was a file (gmapsupp.img) no bigger then 464 kB, which cann't be read by my Etrex Vista.
I expected a file as big as 535 MB since that is the combined size of the original files.

What am i doing wrong?

Offline

#2 2014-08-05 23:24:57

nevw
Member
From: SE Queensland, Australia
Registered: 2013-04-11
Posts: 447

Re: Merging 2 img-maps together

On iMac I need to run java to run mkgmap so put
Java -jar in front of the rest of the mkgmap command.
In my case i need to use the path to java and mkgmap too.
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -jar /Applications/mkgmap-r3132/mkgmap.jar --gmapsupp , etc --output-dir=/Users/xxx/Documents/xxx/

GMapTool is another tool to join img files http://www.gmaptool.eu/en/content/gmaptool

If you find all is not as expected it may be easiest to enable manual tile selection at this site and select all the area in one extract instead  http://garmin.openstreetmap.nl/
or this Benelux area might suit you too  http://www.openfietsmap.nl/  (cycle suited, not for car routing)
or use this site where you can also select the whole area at once  http://extract.bbbike.org/

Last edited by nevw (2014-08-06 02:08:43)

Offline

#3 2014-08-06 16:21:51

Rovani
Member
From: Netherlands
Registered: 2014-08-05
Posts: 2

Re: Merging 2 img-maps together

Thank you for the info! I'm going for the garmin.openstreetmap.nl that is the easiest option.

Offline

#4 2014-08-08 08:10:07

ligfietser
Member
Registered: 2008-10-09
Posts: 5,353
Website

Re: Merging 2 img-maps together

You can also try to combine two img's with OSM combiner, a Javawa tool (based on mkgmap) that will merge the img tiles without having to know the ins and outs of mkgmap.

Offline

#5 2014-08-08 13:54:43

popej
Member
Registered: 2008-09-20
Posts: 500
Website

Re: Merging 2 img-maps together

You might get problems if both img comes form the same map. This could mean that some parts have the same name - typ file or index file. Combining could remove duplicate parts, reducing some functionality.


popej

Offline

#6 2014-08-08 16:13:18

ligfietser
Member
Registered: 2008-10-09
Posts: 5,353
Website

Re: Merging 2 img-maps together

popej wrote:

You might get problems if both img comes form the same map. This could mean that some parts have the same name - typ file or index file. Combining could remove duplicate parts, reducing some functionality.

If gmaps_NL.img and gmaps_BE.img come from garmin.openstreetmap.nl (and are from the same date!) then there will be no issues with OSM combiner (it was made for this purpose).

Offline

#7 2014-08-09 10:56:01

popej
Member
Registered: 2008-09-20
Posts: 500
Website

Re: Merging 2 img-maps together

It doesn't work for me. Combining 2 img removes search index form second img.

I have my own map created with mkgmap. In Mapsource I select 2 sets of tiles and generate 2 img, then I combine both with mkgmap. Size of output img is different depending on order of input img, because removed indexes are different size.

I'm not sure if this error is enough to explain size difference that OP has observed (even assuming that all sizes are in MB).


popej

Offline

#8 2014-08-11 01:17:06

JaVaWa
Member
Registered: 2010-11-15
Posts: 150
Website

Re: Merging 2 img-maps together

The indexes (and routing facilities) are recreated by mkgmap by using the switches  --index, --net and --route

Offline

#9 2014-08-11 11:13:35

popej
Member
Registered: 2008-09-20
Posts: 500
Website

Re: Merging 2 img-maps together

I have tested mkgmap with options provided by OP. If you add --index, then shouldn't you add --code-page too?

Edit: adding options --index doesn't change mkgmap behavior. You would have to split img into tiles and then merge them back, to get new index. And in this case you should provide FID too. Code page is detected correctly.

Last edited by popej (2014-08-11 12:40:16)


popej

Offline

#10 2014-08-11 13:29:17

JaVaWa
Member
Registered: 2010-11-15
Posts: 150
Website

Re: Merging 2 img-maps together

OSM Combiner works best with the osm_generic_tiles.zip files, because they contain the necessary files for creating the overview map, but it can also use gmapsupp.img files. In the latter case it uses your GmapTool to split the files.
When creating the combined map with mkgmap it sets the following options:
area-name, draw-priority, latin1, code-page, show-profiles, net, route, product-id, index, tdbfile, family-name, family-id, series-name, description and overview-mapname

Offline

Board footer

Powered by FluxBB