logo separator

[mkgmap-dev] New User: Inconsistent results - help!

From Andrew Morris drew101 at shaw.ca on Thu May 14 19:36:29 BST 2020

(Sorry for the possible repeat, the previous message was sent from the 
wrong e-mail address)

Recently I updated my GPS unit and decided to also update my maps 
(2011).  After looking at Garmin's prices I decided to take a look at 
OSM, and things have come a long way since I looked last (2012?).

I did some reading and headed down the road.   Things seem to be 
working, but I'm getting inconsistent results - aka the gmapsupp.img 
file is not the same each time I create it.

(Note: My Java isn't the latest-greatest, but it should be sufficient 
for this process: java version "1.8.0_202")

Here's what I've done:

1) Downloaded the latest versions of mkgmap (r4486) and splitter (r597). 
  I also downloaded and compiled osmconvert and osmfilter.  I placed 
them in their own directory:

(I'm a sysadmin by trade, this is what I do...)

ls -l /opt/mkgmap/ /opt/mkgmap/lib/ /opt/mkgmap/bin/
/opt/mkgmap/:
-rw-rw-r-- 1 bin bin   17989 May  6 02:37 LICENCE
-rw-rw-r-- 1 bin bin    2784 May  6 02:37 README
drwxr-xr-x 2 bin bin    4096 May  7 13:58 bin
drwxrwxr-x 3 bin bin    4096 May  6 02:38 doc
drwxrwxr-x 6 bin bin    4096 May  6 02:37 examples
drwxrwxr-x 2 bin bin    4096 May  6 02:37 lib
-rw-rw-r-- 1 bin bin 2350418 May  6 02:37 mkgmap.jar
-rw-rw-r-- 1 bin bin  413879 Jan 30 07:11 splitter.jar

/opt/mkgmap/bin/:
-rwxr-xr-x 1 bin bin 182128 May  7 13:58 osmconvert
-rwxr-xr-x 1 bin bin 100640 May  7 13:58 osmfilter

/opt/mkgmap/lib/:
-rw-rw-r-- 1 bin bin 475284 May  6 02:37 fastutil-6.5.15-mkg.1b.jar
-rw-rw-r-- 1 bin bin 132654 May  6 02:37 osmpbf-1.3.3.jar
-rw-rw-r-- 1 bin bin 533455 May  6 02:37 protobuf-java-2.5.0.jar
-rw-rw-r-- 1 bin bin 120069 Jan 30 07:11 xpp3-1.1.4c.jar

2) I downloaded an OSM extract from Geofabrik, and using splitter carved 
up my canada-latest.osm.pbf into pieces.  As per the wiki I used 
osmconvert and osmfilter to build the bounds data.  These steps are 
consistent and repeatable.  Here are the steps I've taken just in case 
they are consistently wrong...

osmconvert canada-latest.osm.pbf -o=canada-latest.o5m
osmfilter canada-latest.o5m \
   --keep-nodes= \
   --keep-ways-relations="boundary=administrative =postal_code 
postal_code=" \
   -o=canada-latest-boundries.o5m

mkdir bounds
java -cp /opt/mkgmap/mkgmap.jar \
      uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreprocessor \
      canada-latest-boundries.o5m bounds

mkdir work
( cd work ; java -jar /opt/mkgmap/splitter.jar ../canada-latest.osm.pbf )

The final step (afaik) is to combine the split files and the bounds 
information into a single gmapsupp.img file.

( cd work ; java -jar /opt/mkgmap/mkgmap.jar \
                  --route --add-pois-to-areas --bounds=../bounds \
                  --series-name='Canada OSM 2020' \
                  --family-name='Canada OSM 2020' \
                  --area-name='Canada OSM 2020' \
                  --country-name='Canada' --country-abbr='CA' \
                  --description='OpenStreetMap data for Garmin (2020)' \
                  --index --gmapsupp 6324*.osm.pbf )

This always runs to completion with MapFailedExceptions and 
ExitExceptions returning 0.  Approximate time 19 minutes (4 core, 32G).

I am assuming that the series-name, family-name, etc are just different 
tags used by different Garmin units.  I haven't tried uploading it to my 
GPS unit yet as I'm concerned about the inconsistencies.   Here are the 
results from multiple runs (osm/bounds/split data is all identical):

1260027904 May 7 16:54 gmapsupp.img
1260027904 May 7 17:18 gmapsupp2.img
1259929600 May 14 10:49 gmapsupp3.img
1259929600 May 14 11:44 gmapsupp4.img

md5sum -b *.img
34053990aecc68a257e95115b2bb3f45 *gmapsupp.img
91e3d3e9f0012672da65dead8c752dd9 *gmapsupp2.img
821234ad26e17d0135bf613cf9faf161 *gmapsupp3.img
abf39cef1430c4cbd74795fa11b571b8 *gmapsupp4.img

Is this normal?  If so why?

Thank you for any help you can provide!


More information about the mkgmap-dev mailing list