[mkgmap-dev] [PATCH v2] - fix routing problems caused by way's bbox being too large
From Mark Burton markb at ordern.com on Tue Nov 3 14:48:14 GMT 2009
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... -------------- next part -------------- A non-text attachment was scrubbed... Name: mb-limit-way-bbox-v2.patch Type: text/x-patch Size: 12788 bytes Desc: not available Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091103/5463f35c/attachment.bin
- Previous message: [mkgmap-dev] Problems with index creation -> trafer to unit
- Next message: [mkgmap-dev] [PATCH v2] - fix routing problems caused by way's bbox being too large
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list