[mkgmap-dev] [patch] inter-tile routing
From Mark Burton markb at ordern.com on Wed Feb 18 22:32:07 GMT 2009
Yeeha! > Not sure why I never noticed before, but it seems the NOD3 entries > have to be ordered by coordinates! Seems obvious, right? The sample > I've just checked seems to have them ordered by increasing longitude, > but it doesn't have boundary nodes on all edges, so I'm not quite sure > this is right... > > Combined patch against current trunk attached, feedback welcome. Robert, you're a genius - that completely fixes it for my test map. I can route across tile boundaries in all directions I attach a new patch that is the same as what you just posted with the addition of this tweak that stops the RoadDef being attached to a Polyline unless the zoom level is 0. I'm working on the basis that the road info doesn't need to be repeated at higher zoom levels. diff --git a/src/uk/me/parabola/mkgmap/build/MapBuilder.java b/src/uk/me/parabola/mkgmap/build/MapBuilder.java index 5e73ca9..c72b482 100644 --- a/src/uk/me/parabola/mkgmap/build/MapBuilder.java +++ b/src/uk/me/parabola/mkgmap/build/MapBuilder.java @@ -603,7 +603,8 @@ public class MapBuilder implements Configurable { pl.setType(line.getType()); - if (doRoads && line.isRoad()) { + if (doRoads && line.isRoad() && + div.getZoom().getLevel() == 0) { if (log.isDebugEnabled()) log.debug("adding road def: " + line.getName()); RoadDef roaddef = ((MapRoad) line).getRoadDef(); The current patch is good for evaluation but it still requires more work because it won't behave well when boundary nodes are generated that are very close to existing nodes. At the moment it throws the boundary node away which isn't very optimal but should stop other things breaking. Robert, what's the constraints on min distances between nodes and points? Can you have a node very close to the next point in a way? Thanks again for the coordinate sorting breakthrough - you saved me a lot of hours work there! Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: inter-tile-routing-v2.patch Type: text/x-patch Size: 8481 bytes Desc: not available Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090218/a9f282e2/attachment.bin
- Previous message: [mkgmap-dev] [patch] inter-tile routing
- Next message: [mkgmap-dev] [patch] inter-tile routing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list