logo separator

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

From Mark Burton markb at ordern.com on Mon Nov 30 00:11:54 GMT 2009

v4 - added --remove-bogus-nodes option to turn on this feature.

Even though the reduction in nodes is fairly modest (typically 5-10%), I
believe that this could be useful for those routable ways that share
many points with non-routable lines or areas. A lot of roads do
share points with neighbouring areas and in those cases, this option
should remove a lot of bogus nodes. Whether that translates into
improved routing in that region is yet to be proven.

----------

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-v4.patch
Type: text/x-patch
Size: 11601 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091130/7a0a801a/attachment.bin 


More information about the mkgmap-dev mailing list