[PATCH v4] - merge nodes to remove evil short arcs

v4 based on r1044 ---------- v3 now requires the --remove-short-arcs option to enable this feature now deletes consecutive identical points ---------- v2 now reports OSM ids of merged/replaced nodes (at the cost of using more memory while the XML is being converted). only does this stuff if route option enabled. ---------- The attached patch is a first stab at a solution for this problem. Please test. It is implemented in an iterative fashion and it should terminate after a few passes. If 10 passes are executed it will give up, please report if you see it doing that. It would be nice if the diagnostics reported the OSM id of the nodes rather than their coordinates but I haven't worked out the best way of achieving that yet. Cheers, Mark

did a quick test with the patch. less errors reported but also some new ones created. area and splitter areas.list is attached. # with patch applied and --remove-short-arcs java -Xmx1900m -jar ../mkgmap/trunk/dist/mkgmap.jar -c mkgmap.opt 41000001.osm.gz SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken java -Xmx1900m -jar ../mkgmap/trunk/dist/mkgmap.jar -c mkgmap.opt 41000002.osm.gz SEVERE (RoadNetwork): Road RUE DES LILAS contains consecutive identical nodes - routing will be broken java -Xmx1900m -jar ../mkgmap/trunk/dist/mkgmap.jar -c mkgmap.opt 41000003.osm.gz SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken java -Xmx1900m -jar ../mkgmap/trunk/dist/mkgmap.jar -c mkgmap.opt 41000004.osm.gz SEVERE (RoadNetwork): Road SENTIERO VIAANDANTE contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road MAROADI contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken java -Xmx1900m -jar ../mkgmap/trunk/dist/mkgmap.jar -c mkgmap.opt 41000005.osm.gz SEVERE (RoadNetwork): Road ARGENRING contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken # rev 1044 java -Xmx1900m -jar ../mkgmap/trunk/dist/mkgmap.jar -c mkgmap.opt 41000001.osm.gz SEVERE (RoadNetwork): Road OBERLANDSTRASSE contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken java -Xmx1900m -jar ../mkgmap/trunk/dist/mkgmap.jar -c mkgmap.opt 41000002.osm.gz SEVERE (RoadNetwork): Road A3 contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road LINDENWEG contains consecutive identical nodes - routing will be broken java -Xmx1900m -jar ../mkgmap/trunk/dist/mkgmap.jar -c mkgmap.opt 41000003.osm.gz SEVERE (RoadNetwork): Road SCHLOSSBERGSTRASSE contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken java -Xmx1900m -jar ../mkgmap/trunk/dist/mkgmap.jar -c mkgmap.opt 41000004.osm.gz SEVERE (RoadNetwork): Road SENTIERO VIAANDANTE contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken java -Xmx1900m -jar ../mkgmap/trunk/dist/mkgmap.jar -c mkgmap.opt 41000005.osm.gz SEVERE (RoadNetwork): Road ARGENRING contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken SEVERE (RoadNetwork): Road null contains consecutive identical nodes - routing will be broken bzcat planet-090513.osm.bz2 | osmosis --rx - --bb left=7.21 right=11.66 bottom=45.75 top=47.75 # List of areas # Generated Thu May 28 09:05:23 CEST 2009 # 41000001: 2131968,335872 to 2197504,432128 # : 45.747070,7.207031 to 47.153320,9.272461 41000002: 2197504,335872 to 2226176,387072 # : 47.153320,7.207031 to 47.768555,8.305664 41000003: 2197504,387072 to 2226176,432128 # : 47.153320,8.305664 to 47.768555,9.272461 41000004: 2131968,432128 to 2191360,544768 # : 45.747070,9.272461 to 47.021484,11.689453 41000005: 2191360,432128 to 2226176,544768 # : 47.021484,9.272461 to 47.768555,11.689453 On 28 May 2009, at 10:38 , Mark Burton wrote:
v4
based on r1044
----------
v3
now requires the --remove-short-arcs option to enable this feature
now deletes consecutive identical points
----------
v2
now reports OSM ids of merged/replaced nodes (at the cost of using more memory while the XML is being converted).
only does this stuff if route option enabled.
----------
The attached patch is a first stab at a solution for this problem.
Please test.
It is implemented in an iterative fashion and it should terminate after a few passes. If 10 passes are executed it will give up, please report if you see it doing that.
It would be nice if the diagnostics reported the OSM id of the nodes rather than their coordinates but I haven't worked out the best way of achieving that yet.
Cheers,
Mark <mb-short-arc-fix- v4.patch>_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (2)
-
Apollinaris Schoell
-
Mark Burton