Hello Ævar,

> This helps me debug potential zero length arc issues.

How about the attached patch based on your idea, does that give you the
info you need?

It actually makes the code smaller rather than adding to it!

If it's OK for you, I can commit that.

Cheers,

Mark
diff --git a/src/uk/me/parabola/mkgmap/general/RoadNetwork.java b/src/uk/me/parabola/mkgmap/general/RoadNetwork.java
index 6be2d0c..e6bb4e4 100644
--- a/src/uk/me/parabola/mkgmap/general/RoadNetwork.java
+++ b/src/uk/me/parabola/mkgmap/general/RoadNetwork.java
@@ -133,14 +133,11 @@ public class RoadNetwork {
 				RouteNode node1 = getNode(lastId, lastCoord);
 				RouteNode node2 = getNode(id, co);
 
-				if(node1 == node2) {
-					log.error("Road " + road.getRoadDef().getName() + " (OSM id " + road.getRoadDef().getId() + ") contains consecutive identical nodes - routing will be broken");
-					log.error("  " + co.toOSMURL());
-				}
-				else if(arcLength == 0) {
-					log.error("Road " + road.getRoadDef().getName() + " (OSM id " + road.getRoadDef().getId() + ") contains zero length arc");
-					log.error("  " + co.toOSMURL());
-				}
+				if(node1 == node2)
+					log.error("Road " + road.getRoadDef() + " contains consecutive identical nodes at " + co.toOSMURL() + " - routing will be broken");
+				else if(arcLength == 0)
+					log.error("Road " + road.getRoadDef() + " contains zero length arc at " + co.toOSMURL());
+
 
 				Coord bearingPoint = coordList.get(lastIndex + 1);
 				if(lastCoord.equals(bearingPoint)) {
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to