logo separator

[mkgmap-dev] Short mkgmap HowTo

From Steve Hosgood steve at tallyho.bc.nu on Mon Aug 1 10:17:49 BST 2011

On 07/31/2011 11:37 AM, WanMil wrote:
>
>> I am embarrassed for not doing that much recently, and do not really
>> feel entitled to ask this: How difficult would it be to write the
>> address index information in the device format, eliminating the need for
>> MapSource?
> I don't know. Steve might be able to estimate how much work it will be
> to fix that.
> The work to do is to create a map including gmapsupp.img, install it in
> Mapsource, upload it to the device and compare the mkgmap created
> gmapsupp.img and the MapSource created gmapsupp.img. Probably that's
> easy but the non easy part is to understand the differences...
>
>

This should IMHO be the overall goal of the whole mkgmap project.

I made a partial start on this last year. Steve supplied me with a pair 
of maps as described above: one straight from mkgmap and one after 
MapSource had been at it. Unfortunately, I just ended up too busy at 
work to be able to put any work into it. So as Marco said, I too am 
"embarrassed at not having done that much recently" :-(

However, as WanMil points out - understanding what MapSource does is 
tricky. Basically, MapSource changes some of the tables in the MDR 
files, shortening some and extending others. It creates a few new MDR 
tables of its own.

There is a wiki recording the known format of the MDR file on 
"http://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/MDR_Subfile_Format" , 
but Steve has done tons of work on MDR files over the last year or so 
that have not been documented in that wiki.

It would be helpful if someone (not Steve - he's busy!) could get the 
documentation updated. I was doing my best on it before I got swamped 
last year. Not much has changed since then.

The trouble is that it *seems* as if the header "flags" bytes in the MDR 
file tell the parser which options to expect on the matching data table. 
We don't know exactly what the flags are saying. When MapSource changes 
tables from what Steve's mkgmap had generated, it changes the flags, but 
we need to do some detective work to understand how the flags reflect 
the edits.

We probably could get away in many case just copying the flags and 
structures that we see from MapSource, true understanding may not be 
needed immediately. But documentation *will* be needed (unless one sole 
enthusiast goes it alone) and a fair bit of experimentation will be 
inevitable.

It's possible that MapSource makes changes to the other subfiles in the 
.img - I don't remember what I saw of that (if anything) last year.

Steve Hosgood.




More information about the mkgmap-dev mailing list