logo separator

[mkgmap-dev] [PATCH v3] remove bogus nodes

From Mark Burton markb at ordern.com on Sat Nov 28 14:03:14 GMT 2009

v3 - now duplicates ways so that any structural changes to the way made
while processing a line/road will not affect the original way and so
each map object generated from the original way will see the full set
of points in the way.

Duplicating the ways appeared to have no noticeable effect on the run
time when processing the GB map.

--------

v2 - avoid assertion when more than one routable way is generated from
the same OSM way

-------

With the recent reversion of the Table A breakage, it's now useful
to post this patch for wider testing as it no longer causes my Nuvi to
barf.

What it does is remove routing nodes from ways that should never have
been put there in the first place. Without this patch, a routable way
will have a node for each of its points that are shared by any other
way (whether the other ways are routable or not). For example, at the
moment, if a way shares its points with a boundary line or shape, each
of those points will become nodes. From the routing point of view,
that's (essentially) harmless but having extra nodes does take up space
and must slow down the routing calculation.

It therefore makes sense to remove the bogus nodes.

What this patch does is defer the processing of all of the
points/lines/shapes until after their types have been computed. Having
computed the ways' types we know what's routable and what isn't so
nodes only need to be created where routable ways meet.

That's the theory, in practice, it produces slightly smaller maps.

Whether it actually improves the routing quality is yet to be
determined.

Obviously, the gain you will see depends on how many bogus nodes are in
your maps.

All feedback welcome.

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mb-remove-bogus-nodes-v3.patch
Type: text/x-patch
Size: 10075 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091128/425ab971/attachment.bin 


More information about the mkgmap-dev mailing list