
Hi all, attached is a patch that changes parts of the program logic regarding restriction relations to make it more stable and add further plausibility checks. The compiled binary is here: http://files.mkgmap.org.uk/download/198/mkgmap.jar Compared to r3189 it fixes some errors and adds new checks: 1) only these restrictions are evaluated: no_right_turn / no_left_turn / no_u_turn / no_straight_on / only_right_turn / only_left_turn / only_straight_on / no_entry / no_exit 2) to-ways that build a loop so that first and last point end at the via node are now supported if the restriction contains a direction info (left, right,...). 3) Further plausibility checks are performed to find restrictions where the angle of the from and to way don't match the direction info, for example when a no_right_turn looks more like a no_left_turn. 4) Restrictions with multiple via ways are now supported as well as via ways with additional nodes. The new limit is given by the img format: it allows to specify a "path" with up to 8 routing nodes. I've tested the patch with default style and all tiles for Germany, as well as Hennings and Minkos style. I found no more severe error message, and the remaining warnings seem to be correct. Please test this patch with your style and check the log regarding warnings for restrictions, if I hear no complains, ll commmit it on friday. Gerd

Hi, Le 15/04/2014 06:55, Gerd Petermann a écrit :
Hi all,
attached is a patch that changes parts of the program logic regarding restriction relations to make it more stable and add further plausibility checks. The compiled binary is here: ** |http://files.mkgmap.org.uk/download/198/mkgmap.jar
I tested this binary for French Guiana extract and got this issue: java.lang.NoClassDefFoundError: it/unimi/dsi/fastutil/longs/Long2ObjectOpenHashMap at uk.me.parabola.mkgmap.reader.osm.OSMId2ObjectMap.<init>(OSMId2ObjectMap.java:38) at uk.me.parabola.mkgmap.reader.osm.ElementSaver.<init>(ElementSaver.java:49) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.createElementSaver(OsmMapDataSource.java:170) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.setupHandler(OsmMapDataSource.java:152) at uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinMapDataSource.load(O5mBinMapDataSource.java:43) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:216) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.ClassNotFoundException: it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 14 more No problem with mkgmap-r3189. Need something ? Regards.

Hi Stéphane, seems that you are running the binary without the libraries. When r3189 works, please replace it with it with the patched binary. (or rename one) Gerd Stéphane MARTIN wrote
Hi,
Le 15/04/2014 06:55, Gerd Petermann a écrit :
Hi all,
attached is a patch that changes parts of the program logic regarding restriction relations to make it more stable and add further plausibility checks. The compiled binary is here: ** |http://files.mkgmap.org.uk/download/198/mkgmap.jar
I tested this binary for French Guiana extract and got this issue:
java.lang.NoClassDefFoundError: it/unimi/dsi/fastutil/longs/Long2ObjectOpenHashMap at uk.me.parabola.mkgmap.reader.osm.OSMId2ObjectMap. <init> (OSMId2ObjectMap.java:38) at uk.me.parabola.mkgmap.reader.osm.ElementSaver. <init> (ElementSaver.java:49) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.createElementSaver(OsmMapDataSource.java:170) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.setupHandler(OsmMapDataSource.java:152) at uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinMapDataSource.load(O5mBinMapDataSource.java:43) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:216) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.ClassNotFoundException: it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 14 more
No problem with mkgmap-r3189. Need something ?
Regards. _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/patch-v1-route-restrictions-tp5803266p5803286... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Got this one with a Germany extract from Europe: SCHWERWIEGEND (RoadNetwork): 66923004.o5m: Turn restriction (no_u_turn) http://www.openstreetmap.org/browse/relation/3598267 (at http://www.openstreetmap.org/?mlat=51.554189&mlon=6.982870&zoom=17) can't locate arc from 'via' node at http://www.openstreetmap.org/?mlat=51.554286&mlon=6.982932&zoom=17 to next 'via' node on way 24454126 It is still running, will monitor for more... -- View this message in context: http://gis.19327.n5.nabble.com/patch-v1-route-restrictions-tp5803266p5803280... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Uli, please post a link to the input file 66923004.o5m Gerd UliBaer wrote
Got this one with a Germany extract from Europe:
SCHWERWIEGEND (RoadNetwork): 66923004.o5m: Turn restriction (no_u_turn) http://www.openstreetmap.org/browse/relation/3598267 (at http://www.openstreetmap.org/?mlat=51.554189&mlon=6.982870&zoom=17) can't locate arc from 'via' node at http://www.openstreetmap.org/?mlat=51.554286&mlon=6.982932&zoom=17 to next 'via' node on way 24454126
It is still running, will monitor for more...
-- View this message in context: http://gis.19327.n5.nabble.com/patch-v1-route-restrictions-tp5803266p5803287... Sent from the Mkgmap Development mailing list archive at Nabble.com.

GerdP wrote
Hi Uli,
please post a link to the input file 66923004.o5m
Gerd
Hi Gerd, there were no more messages and here is the input file: http://files.mkgmap.org.uk/download/199/66923004.o5m Regards, Uli -- View this message in context: http://gis.19327.n5.nabble.com/patch-v1-route-restrictions-tp5803266p5803288... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Uli, okay, I can reproduce that. The via way is "destroyed" by the LinkDestinationHook (used with option --process-destinations). I'll post a new patch to avoid a split of via ways in this hook. Gerd UliBaer wrote
GerdP wrote
Hi Uli,
please post a link to the input file 66923004.o5m
Gerd Hi Gerd,
there were no more messages and here is the input file: http://files.mkgmap.org.uk/download/199/66923004.o5m
Regards, Uli
-- View this message in context: http://gis.19327.n5.nabble.com/patch-v1-route-restrictions-tp5803266p5803294... Sent from the Mkgmap Development mailing list archive at Nabble.com.

On Tue, Apr 15, Gerd Petermann wrote:
Please test this patch with your style and check the log regarding warnings for restrictions, if I hear no complains, ll commmit it on friday.
There is something suspect, and again this is near the tile boundary: 2014/04/15 13:12:42 WARNING (RestrictionRelation): 71200057.osm.pbf: Turn restriction (no_left_turn) http://www.openstreetmap.org/browse/relation/1966720 (at http://www.openstreetmap.org/?mlat=47.858567&mlon=12.128272&zoom=17) way http://www.openstreetmap.org/browse/way/6111356 starts and ends at same node, don't konw which one to use http://osm.thkukuk.de/tmp/71200057.osm.pbf Thorsten -- Thorsten Kukuk, Senior Architect SLES & Common Code Base SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

Hi Thorsten, I think this is an error in the OSM data. The message is correct, way 6111356 starts and ends with node 48911248, so it builds a closed loop. Gerd
Date: Tue, 15 Apr 2014 15:01:10 +0200 From: kukuk@suse.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] [patch v1] route restrictions
On Tue, Apr 15, Gerd Petermann wrote:
Please test this patch with your style and check the log regarding warnings for restrictions, if I hear no complains, ll commmit it on friday.
There is something suspect, and again this is near the tile boundary:
2014/04/15 13:12:42 WARNING (RestrictionRelation): 71200057.osm.pbf: Turn restriction (no_left_turn) http://www.openstreetmap.org/browse/relation/1966720 (at http://www.openstreetmap.org/?mlat=47.858567&mlon=12.128272&zoom=17) way http://www.openstreetmap.org/browse/way/6111356 starts and ends at same node, don't konw which one to use
http://osm.thkukuk.de/tmp/71200057.osm.pbf
Thorsten
-- Thorsten Kukuk, Senior Architect SLES & Common Code Base SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Tue, Apr 15, Gerd Petermann wrote:
Hi Thorsten,
I think this is an error in the OSM data. The message is correct, way 6111356 starts and ends with node 48911248, so it builds a closed loop.
Sorry, I hadn't seen that. You are right, I fixed the OSM data. Thorsten -- Thorsten Kukuk, Senior Architect SLES & Common Code Base SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
participants (5)
-
Gerd Petermann
-
GerdP
-
Stéphane MARTIN
-
Thorsten Kukuk
-
UliBaer