removeShortArcs_v4.patch for regression in r2448

Hi, I still have no idea what exactly goes wrong, but it seems that we have to apply short arc removal to all ways that are not shapes. Since r2448 this was no longer done, which broke routing. Attached patch for r2473 changes the code so that removeShortArcs is again done for roads and other lines. removeShortArcs_v4.patch <http://gis.19327.n5.nabble.com/file/n5747776/removeShortArcs_v4.patch> Gerd -- View this message in context: http://gis.19327.n5.nabble.com/removeShortArcs-v4-patch-for-regression-in-r2... Sent from the Mkgmap Development mailing list archive at Nabble.com.

On 02/02/13 19:21, GerdP wrote:
Hi,
I still have no idea what exactly goes wrong, but it seems that we have to apply short arc removal to all ways that are not shapes. Since r2448 this was no longer done, which broke routing.
There is something odd I noticed, but ignored before as it also happens in the previous version. In some cases there are entries in RGN that are part of a road that do not link to an entry in NET, but only to a label. I don't know why this happens. What would happen if a road is (incorrectly) joined to a non-routable line? ..Steve

Hi Steve, Steve Ratcliffe wrote
On 02/02/13 19:21, GerdP wrote:
Hi,
I still have no idea what exactly goes wrong, but it seems that we have to apply short arc removal to all ways that are not shapes. Since r2448 this was no longer done, which broke routing.
There is something odd I noticed, but ignored before as it also happens in the previous version.
In some cases there are entries in RGN that are part of a road that do not link to an entry in NET, but only to a label. I don't know why this happens.
Is this the reason for the error messages from NetCheck for r2448 and higher? I did not find a case were a road was written to RGN, but not to NET. Steve Ratcliffe wrote
What would happen if a road is (incorrectly) joined to a non-routable line?
Hmm, If I got it right, removeShortArcs replaces nodes within ways, it doesn't join two ways. I mean, it may replace the coord of a road by a coord of a non-routable line. In my test data this happens a few times. Ciao, Gerd -- View this message in context: http://gis.19327.n5.nabble.com/removeShortArcs-v4-patch-for-regression-in-r2... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi
Is this the reason for the error messages from NetCheck for r2448 and higher? I did not find a case were a road was written to RGN, but not to NET.
No, I added code to ignore the messages when this happened. I will remove it again until I understand if it is really a problem or not. The situation shows up as an empty name in the output from NetCheck (because I'm using classes from mkgmap that are not designed for this purpose).
Hmm, If I got it right, removeShortArcs replaces nodes within ways, it doesn't join two ways. I mean, it may replace the coord of a road by a coord of a non-routable line. In my test data this happens a few times.
I meant if the input had badly connected ways, not that your code might join them. I just did a quick check and it didn't cause a problem I could see. ..Steve

Hi Steve, the errors reported by NetCheck occurs in ~ 50% of my input files (DACH). I don't think that it is a special case in the OSM data. Gerd
Date: Sun, 3 Feb 2013 10:23:17 +0000 From: steve@parabola.me.uk To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] removeShortArcs_v4.patch for regression in r2448
Hi
Is this the reason for the error messages from NetCheck for r2448 and higher? I did not find a case were a road was written to RGN, but not to NET.
No, I added code to ignore the messages when this happened. I will remove it again until I understand if it is really a problem or not. The situation shows up as an empty name in the output from NetCheck (because I'm using classes from mkgmap that are not designed for this purpose).
Hmm, If I got it right, removeShortArcs replaces nodes within ways, it doesn't join two ways. I mean, it may replace the coord of a road by a coord of a non-routable line. In my test data this happens a few times.
I meant if the input had badly connected ways, not that your code might join them. I just did a quick check and it didn't cause a problem I could see.
..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd
the errors reported by NetCheck occurs in ~ 50% of my input files (DACH). I don't think that it is a special case in the OSM data.
Quite by accident, I found a tile that failed the NetCheck test from Jan 2011 and version r1773. So the problem has existed for a long time - although it was very rare with that version - I found only one tile. I am still guessing, but in LinePreparer we throw away lines that have less than two (or three if a polygon) points that have different coordinates - so lines that have a zero length (or polygons that don't have an area). This is probably far too late and may mean that pointers are left pointing to the wrong thing. If this is the problem, then we do need to remove any zero length line. The remove short arc code will do this, but perhaps for non-roads all we need is a quick check for zero length lines. ..Steve

Hi Steve, good catch :-) I see that this happes for exactly the subdivision that is reported to contain errors. So you are right, for non-routable ways we have to check that. I will work on this tomorrow. Gerd Steve Ratcliffe wrote
Hi Gerd
the errors reported by NetCheck occurs in ~ 50% of my input files (DACH). I don't think that it is a special case in the OSM data.
Quite by accident, I found a tile that failed the NetCheck test from Jan 2011 and version r1773. So the problem has existed for a long time - although it was very rare with that version - I found only one tile.
I am still guessing, but in LinePreparer we throw away lines that have less than two (or three if a polygon) points that have different coordinates - so lines that have a zero length (or polygons that don't have an area).
This is probably far too late and may mean that pointers are left pointing to the wrong thing.
If this is the problem, then we do need to remove any zero length line. The remove short arc code will do this, but perhaps for non-roads all we need is a quick check for zero length lines.
..Steve
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/removeShortArcs-v4-patch-for-regression-in-r2... Sent from the Mkgmap Development mailing list archive at Nabble.com.

That patch doesn't work for me - mkgmap crashes with: java.lang.UnsupportedOperationException at uk.me.parabola.mkgmap.osmstyle.eval.AbstractOp.value(AbstractOp.java:110) at uk.me.parabola.mkgmap.osmstyle.eval.EqualsOp.eval(EqualsOp.java:44) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.ActionRule.resolveType(ActionRule.java:59) at uk.me.parabola.mkgmap.osmstyle.RuleSet.resolveType(RuleSet.java:68) at uk.me.parabola.mkgmap.osmstyle.StyledConverter.convertWay(StyledConverter.java:216) at uk.me.parabola.mkgmap.reader.osm.ElementSaver.convert(ElementSaver.java:237) at uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource.load(OsmBinMapDataSource.java:75) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:144) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:201) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:198) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) On 02.02.2013 20:21, GerdP wrote:
Hi,
I still have no idea what exactly goes wrong, but it seems that we have to apply short arc removal to all ways that are not shapes. Since r2448 this was no longer done, which broke routing.
Attached patch for r2473 changes the code so that removeShortArcs is again done for roads and other lines.
removeShortArcs_v4.patch <http://gis.19327.n5.nabble.com/file/n5747776/removeShortArcs_v4.patch>
Gerd
-- View this message in context: http://gis.19327.n5.nabble.com/removeShortArcs-v4-patch-for-regression-in-r2... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org

Hi Felix, looks strange. The error occurs at a place which is not touched by the patch. All that was changed happens after the evaluation of the style. Please make sure that you apply it against trunk (r2472) and do an ant clean Gerd Felix Hartmann-2 wrote
That patch doesn't work for me - mkgmap crashes with:
java.lang.UnsupportedOperationException at uk.me.parabola.mkgmap.osmstyle.eval.AbstractOp.value(AbstractOp.java:110) at uk.me.parabola.mkgmap.osmstyle.eval.EqualsOp.eval(EqualsOp.java:44) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.ActionRule.resolveType(ActionRule.java:59) at uk.me.parabola.mkgmap.osmstyle.RuleSet.resolveType(RuleSet.java:68) at uk.me.parabola.mkgmap.osmstyle.StyledConverter.convertWay(StyledConverter.java:216) at uk.me.parabola.mkgmap.reader.osm.ElementSaver.convert(ElementSaver.java:237) at uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource.load(OsmBinMapDataSource.java:75) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:144) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:201) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:198) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
On 02.02.2013 20:21, GerdP wrote:
Hi,
I still have no idea what exactly goes wrong, but it seems that we have to apply short arc removal to all ways that are not shapes. Since r2448 this was no longer done, which broke routing.
Attached patch for r2473 changes the code so that removeShortArcs is again done for roads and other lines.
removeShortArcs_v4.patch <http://gis.19327.n5.nabble.com/file/n5747776/removeShortArcs_v4.patch>
Gerd
-- View this message in context: http://gis.19327.n5.nabble.com/removeShortArcs-v4-patch-for-regression-in-r2... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- keep on biking and discovering new trails
Felix openmtbmap.org & www.velomap.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/removeShortArcs-v4-patch-for-regression-in-r2... Sent from the Mkgmap Development mailing list archive at Nabble.com.

yeah, sorry, just noticed. Must have something to do with the integration of the functions branch. I had some patches regarding the functions branch previously. Need to figure out now, what files are broken (the updates applied fine, but there seem to be some leftovers). On 03.02.2013 20:14, GerdP wrote:
Hi Felix,
looks strange. The error occurs at a place which is not touched by the patch. All that was changed happens after the evaluation of the style. Please make sure that you apply it against trunk (r2472) and do an ant clean
Gerd
Felix Hartmann-2 wrote
That patch doesn't work for me - mkgmap crashes with:
java.lang.UnsupportedOperationException at uk.me.parabola.mkgmap.osmstyle.eval.AbstractOp.value(AbstractOp.java:110) at uk.me.parabola.mkgmap.osmstyle.eval.EqualsOp.eval(EqualsOp.java:44) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.eval.AndOp.eval(AndOp.java:34) at uk.me.parabola.mkgmap.osmstyle.ActionRule.resolveType(ActionRule.java:59) at uk.me.parabola.mkgmap.osmstyle.RuleSet.resolveType(RuleSet.java:68) at uk.me.parabola.mkgmap.osmstyle.StyledConverter.convertWay(StyledConverter.java:216) at uk.me.parabola.mkgmap.reader.osm.ElementSaver.convert(ElementSaver.java:237) at uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource.load(OsmBinMapDataSource.java:75) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:144) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:201) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:198) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
On 02.02.2013 20:21, GerdP wrote:
Hi,
I still have no idea what exactly goes wrong, but it seems that we have to apply short arc removal to all ways that are not shapes. Since r2448 this was no longer done, which broke routing.
Attached patch for r2473 changes the code so that removeShortArcs is again done for roads and other lines.
removeShortArcs_v4.patch <http://gis.19327.n5.nabble.com/file/n5747776/removeShortArcs_v4.patch>
Gerd
-- View this message in context: http://gis.19327.n5.nabble.com/removeShortArcs-v4-patch-for-regression-in-r2... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- keep on biking and discovering new trails
Felix openmtbmap.org & www.velomap.org
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@.org http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- View this message in context: http://gis.19327.n5.nabble.com/removeShortArcs-v4-patch-for-regression-in-r2... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org
participants (4)
-
Felix Hartmann
-
Gerd Petermann
-
GerdP
-
Steve Ratcliffe