logo separator

[mkgmap-dev] [PATCH v2] - fix routing problems caused by way's bbox being too large

From Felix Hartmann extremecarver at googlemail.com on Tue Nov 3 22:45:13 GMT 2009

Mark Burton wrote:
> v2 - added some assertions to catch out of bound line start coordinates
> - Increased size of line bbox - reduced size of polygon bbox.
>
> I can process the whole of the UK with this patch without errors -
> please test this on as much map data as possible and report any
> assertions or SEVERE messages.
>
> The reduction in size of the polygon bbox could possibly make a
> difference to some large polygons (could this help with the sea areas?)
>
> ------
>
> Ok, I think I know what's been going wrong with some people's
> maps where the routing goes zig-zaggy when the way is longish. However,
> it's not the number of points in the way or even the length of the way
> that's wrong.
>
> It's because the bounding box becomes sufficiently large that it causes
> the line to be split by the LineSizeSplitterFilter. This ancient
> bit of code splits the line so that it doesn't have a bigger bounding
> box than it thinks is acceptable. Well, that may be OK for plain lines
> but for routable stuff like roads, it's bad news because there's no node
> between the two parts of the split line. If, by chance, the point at
> where the way was split was actually a node anyway, it probably worked
> OK but for other points, anything could happen!
>
> So the attached patch checks the way's bounding box earlier on when
> it's doing all that boring way size/arc size/node count checking and if
> the BB gets too large it snips the way in the accustomed fashion.
>
> Anyway, please try the attached patch and see if it works OK - (no new
> bad routing, no assertions, etc.)
>
> Bloody hell, another long evening spent hacking mkgmap...
>   
I have the problem that with the patch applied the mdr creation breaks 
(on Austria and Alps from Geofabrik)!
Without the patch, this error does not occur!

Otherwise I could not find any differences to patch v1 (though filesize 
is different on about every 5th tile)

D:\Garmin\mkgmap_680>REM austria at 6365 this is run35
22:14:14
Regions for map:  HALL INNSBRUCK-LAND KUFSTEIN LINDAU (BODENSEE) 
ROSENHEIM SALZBURG SANKT GALLEN SCHWAZ TIROL VORARLBERG
Exception in thread "main" java.lang.AssertionError: deltaLong = 64621
        at 
uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:136)
        at 
uk.me.parabola.imgfmt.app.trergn.RGNFileReader.fetchPointsCommon(RGNFileReader.java:117)
        at 
uk.me.parabola.imgfmt.app.trergn.RGNFileReader.pointsForSubdiv(RGNFileReader.java:77)
        at 
uk.me.parabola.imgfmt.app.map.MapReader.pointsForLevel(MapReader.java:107)
        at 
uk.me.parabola.mkgmap.combiners.MdrBuilder.addPoints(MdrBuilder.java:170)
        at 
uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:113)
        at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:361)
        at 
uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:124)
        at uk.me.parabola.mkgmap.main.Main.main(Main.java:122)
22:16:35

Bzw fuer alps:
D:\Garmin\mkgmap_680>REM alps alp 6528 this is run40
22:20:19
Regions for map:  AIN HAUTE SAVOIE HAUTE-SAVOIE HAUTE-SAVOIE-GROISY 
IS?RE RHE`NE-ALPES SAVOIE
Exception in thread "main" java.lang.AssertionError: deltaLong = 65331
        at 
uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:136)
        at 
uk.me.parabola.imgfmt.app.trergn.RGNFileReader.fetchPointsCommon(RGNFileReader.java:117)
        at 
uk.me.parabola.imgfmt.app.trergn.RGNFileReader.pointsForSubdiv(RGNFileReader.java:77)
        at 
uk.me.parabola.imgfmt.app.map.MapReader.pointsForLevel(MapReader.java:107)
        at 
uk.me.parabola.mkgmap.combiners.MdrBuilder.addPoints(MdrBuilder.java:170)
        at 
uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:113)
        at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:361)
        at 
uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:124)
        at uk.me.parabola.mkgmap.main.Main.main(Main.java:122)
> ------------------------------------------------------------------------
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091103/e9489d90/attachment.html 


More information about the mkgmap-dev mailing list