logo separator

[mkgmap-dev] Short mkgmap HowTo

From Steve Hosgood steve at tallyho.bc.nu on Tue Aug 2 10:56:44 BST 2011

On 08/01/2011 08:58 PM, WanMil wrote:
>> 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" :-(
Now I am embarrassed again - can't spell "Marko"! Sorry!

>> 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.
> That's quite important although it's very much work to sort out the
> format from the source code and from the display outputs.
>
It's true - irritatingly for me, most of Steve's old "format 
deciphering" tools were written in Java, which isn't a language I'm very 
familiar with. A proper update of the wiki would now require a read 
through the source code of mkgmap. Which is also written in £$µ%##&* Java!

>> 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.
> I am not sure if the MDR description in the wiki is enough for
> development work. During development you need a lot of "maybe" variants
> where you can just guess parameters. We should find a common markup for
> such variants in the wiki.
>
I tried, but I was never happy with the way it came out. Even though I 
changed the format several times to try and make it more readable (use 
of wikitables etc).

Feel free to try your own changes..

>> 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.
> I haven't seen that so far.
> But MapSource creates a new .md2 file that does not have the common img
> format.
>
That's news. I never noticed that last year.

>    From my point of view we should start with a better understanding and
> description of the MDR17 section. It's a section which is created by
> MapSource and has a tricky but manageable format.
>
The existing wiki entries on MDR17 were I think done by me, based 
entirely on what I saw in the Garmin NT maps for the UK that came with 
my Streetpilot.

Tricky indeed, but critical in getting street searching (and I think 
PostCode searching) to work.
I only got some of the way into it.

> Then start to code a simple MDR17 for small maps and the changes to
> other MDR sections for quite small maps (max 2 tiles,<  100 street
> names,<  10 cities, one country). Once we have a small map running we
> might be better able to expand the map size and the changes to the MDR
> sections.#
You'll probably have to use MapSource to generate an MDR17 section for a 
small, well-known map. I'd start with just a single village, generate 
the maps, then add one new streetname, generate the maps again, compare.

Currently, my knowledge of MDR17 (see wiki) is nowhere near good enough 
to be able to create a working MDR17.

>
> I am not sure at the moment if we should create a MapSource MDR file and
> then convert it by mkgmap to the device MDR or should we directly create
> the GPS device MDRs? What do you think?
>

Directly create the device MDRs for certain. Whilst you're inside mkgmap 
you have all the info you need. To try and do it later, you'll need to 
decode all the LBL subfiles and other stuff first. Better to do it all 
with the raw data.

Steve




More information about the mkgmap-dev mailing list