logo separator

[mkgmap-dev] Drive-on-left

From Colin Smale colin.smale at xs4all.nl on Tue Aug 13 12:03:02 BST 2013


Hi Steve and list, 

Thanks very much for committing that change!

On 2013-08-13 10:50, Steve Ratcliffe wrote: 

> Hi
> 
>> live with that very easily, but I wonder if the final value of that "implication" could be propagated to the TRE header somehow, so it is simpler to document and understand?
> 
> The way that the implied value is transmitted to the NOD header does
> not work in the case that you have max-jobs greater than one and
> you are compiling files with differing left/right sides. So I am not
> keen to extend that any further.
...
>> noticed that the maps produced by mkgmap are "base maps" whereas Garmin's own maps are "detail maps". Similarly with the "background=water" vs "background=land" (0x10) which ImgTool also reveals.
> 
> I don't know anything about this one. It sounds like it might be 
> important though.

As I think you mentioned earlier, the "left/right implication" code may
not be used very often in practice. Removing that code, allowing it to
default to drive-on-right and needing to set the option for the
drive-on-left countries sounds to me like it should be acceptable. What
we have now is really that already; drive-on-left won't actually work
fully unless you set the flag explicitly.

>> Any idea if the "base map" vs. "detail map" flag (0x01) is important? I
> 
> It can't be that important, given that have survived this long without 
> it. But I think we should set it. Could you let me know which byte
> in the header it is or create a patch.

This is what ImgTool shows now for a UK map:

63260001 TRE 12061 Fat: C00h Data section: 2AE000h
Date: 07.08.2013 00:56:14
MapID: 03C54561 (63260001)
Priority: 26
TRE parameters: 1 3 17 32 (Basemap - Not transparent - Display house #
before street - Display PCode after city - Background: land - Driving
side is left)
Coordinates: N: 51.503906 S: 49.086914 O:-9.096680 E:-4.262695
Levels [15,16,18,20,22,24], Zoom [85,4,3,2,1,0]
Map data (c) OpenStreetMap and its contributors
http://www.openstreetmap.org/copyright

This map data is made available under the Open Database License:
http://opendatacommons.org/licenses/odbl/1.0/
Any rights in individual contents of the database are licensed under the
Database Contents License: http://opendatacommons.org/licenses/dbcl/1.0/

Map created with mkgmap-r2661M
Program released under the GPL

The "TRE parameters" are coming out as 1,3,17,32 where the fourth number
(32) corresponds to the flags shown on the "TRE parameters" dialog when
you click the button at top left. When I saw "drive on left" I went
searching though the source code and found that these bits seemed to
correspond to the declarations in TREHeader.java:

public static final int POI_FLAG_TRANSPARENT = 0x2;
public static final int POI_FLAG_STREET_BEFORE_HOUSENUMBER = 0x4;
public static final int POI_FLAG_POSTALCODE_BEFORE_CITY = 0x8;

Now there is a value (0x20) added for drive-on-left as well. Judging by
ImgTool's output, we could add:
public static final int POI_FLAG_DETAILMAP = 0x1;
public static final int POI_FLAG_BACKGROUND_IS_WATER = 0x10;

But as ImgTool allows you to manipulate the values directly, we can
experiment with these two to see what the effect is before making any
changes to mkgmap. I will certainly give this a try, but I don't think I
know enough about all the places to look for possible effects so it
would be good if others can comment as well.

BTW, ImgTool is here: https://sites.google.com/site/sherco40/imgtool [1]
Download here:
https://sites.google.com/site/sherco40/ImgTool1.7.4.zip?attredirects=0

> 
> ..Steve
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev [1]

Links:
------
[1] http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Links:
------
[1] https://sites.google.com/site/sherco40/imgtool
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20130813/eedac168/attachment.html 


More information about the mkgmap-dev mailing list