On 05/08/13 19:30, Colin Smale wrote:
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!

Very interesting.

I've created a patch based on your discovery which is attached.

It only works when there is an explicit --drive-on-left flag and not
when mkgmap infers it by looking at the direction of roundabouts.
How important do you think that is?  I think it is much safer to
give the flag than letting mkgmap guess which can be wrong for all
kinds of reasons.

Cheers,

..Steve
Index: src/uk/me/parabola/imgfmt/app/trergn/TREHeader.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/imgfmt/app/trergn/TREHeader.java	(revision 2659)
+++ src/uk/me/parabola/imgfmt/app/trergn/TREHeader.java	(revision )
@@ -58,6 +58,7 @@
 	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;
+	public static final int POI_FLAG_DRIVE_ON_LEFT = 0x20;
 
 	// Bounding box.  All units are in map units.
 	private Area area = new Area(0,0,0,0);
@@ -239,6 +240,9 @@
 
 		if (props.containsKey("transparent"))
 			poiDisplayFlags |= POI_FLAG_TRANSPARENT;
+
+		if (props.containsKey("drive-on-left"))
+			poiDisplayFlags |= POI_FLAG_DRIVE_ON_LEFT;
 	}
 	
 	/**
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to