This patch should cure the problem where something that isn't a highway
or a ferry route is mutated into a routable way by the style file and,
subsequently, due to its shape/size/topology/etc introduces a short
arc.

I would be grateful if as many people as possible test this and
report any breakage as it could have an effect on any map (although, I
believe it safe enough).

Cheers,

Mark
diff --git a/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java b/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
index ff804ad..e350483 100644
--- a/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
+++ b/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
@@ -284,11 +284,6 @@ class Osm5XmlHandler extends DefaultHandler {
 				String highway = currentWay.getTag("highway");
 				if(highway != null ||
 				   "ferry".equals(currentWay.getTag("route"))) {
-					// the way is a highway (or ferry route), so for
-					// each of it's points, increment the number of
-					// highways using that point
-					for(Coord p : currentWay.getPoints())
-						p.incHighwayCount();
 					// if the way is a roundabout but isn't already
 					// flagged as "oneway", flag it here
 					if("roundabout".equals(currentWay.getTag("junction"))) {
@@ -711,6 +706,7 @@ class Osm5XmlHandler extends DefaultHandler {
 				}
 			}
 			currentWay.addPoint(co);
+			co.incHighwayCount(); // nodes (way joins) will have highwayCount > 1
 			if(minimumArcLength != null)
 				nodeIdMap.put(co, id);
 		}
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to