logo separator

[mkgmap-dev] Drive-on-left

From Colin Smale colin.smale at xs4all.nl on Mon Aug 5 19:30:15 BST 2013


Hi, 

In the last couple of years I have been making maps with mkgmap for both
the UK and various continental countries. One problem that I have never
been able to fix until now is that the "drive-on-left" flag didn't seem
to have any effect on roundabouts in the UK. The "impact" is limited
because roundabouts are one way anyway, but the pictographic
representations of roundabouts always assume drive-on-right so you
appear to be directed to drive the wrong way. 

I took a look at the code and saw that the drive-on-left and
drive-on-right flags are only used to set a flag in NODHeader.java.
However I just discovered ImgTool[1] which exposes the "TRE parameters",
a sequence of four numbers which, I noticed, include a flag for
"drive-on-left". This was not being set on my UK maps (despite using the
drive-on-left option for mkgmap) so they all appeared to be
drive-on-right. With ImgTool I was able to simply set this bit in my img
file - and then the problems with the roundabout direction disappeared! 

I am not really a Java programmer so I don't feel confident about trying
to fix this myself, but it seems there is related code in TREHeader.java
including the following declarations: 

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; 

I think it just needs something like this adding: 

public static final int POI_FLAG_DRIVE_ON_LEFT = 0x20; 

plus the code to set this bit depending on the drive-on-left flag. 

It would be great if this could be changed in mkgmap. If I should really
be logging this elsewhere please accept my apologies and point to me to
the right place and I will enter the details there. 

Best regards (and thanks everyone for a tremendous program!) 

Colin 

[1] https://sites.google.com/site/sherco40/imgtool [1] 


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/20130805/6dc0f02d/attachment-0001.html 


More information about the mkgmap-dev mailing list