logo separator

[mkgmap-dev] splitter - performance and memory

From Steve Ratcliffe steve at parabola.me.uk on Wed Jul 22 12:52:36 BST 2009

Hi Chris

On 22/07/09 12:17, Chris Miller wrote:
> 1) If a way covers more than one area, should ALL nodes for the way belong
> to all of those areas, or should each area only contain the nodes that lie
> within it, regardless of ways? Currently the latter seems to be the case
> but that feels wrong to me.

You need at least one node outside the area for each time a way
crosses the boundary, so that mkgmap can cut the way on the boundary.
Or else you need to manufacture the nodes that sit exactly on the
boundary yourself.  The later option is practically not possible(*) as
you need to know if something is a line or a polygon to do it

The current splitter works by including all nodes in an extended area 
and letting mkgmap split the ways on the declared boundary.
So it could fail if the spacing between nodes is larger than the extra
overlaping area.  Fortunately, large node spacings are impractical for 
all sorts of tools so don't occur much.

> 2) Does the XML have to contain nodes first, then ways, then relations, or
> can they be intermingled? (I think osmcut produced files like this) If it
> is permitted, what are the consequences of intermingling them for other tools
> etc? I know that as it stands splitter.jar expects them to be in node/way/relation

Well for maximum compatibility they should be in that order. Splitter
doesn't actually require them to be in that order, as long as
nodes occur before the ways that need them.  I added this
because there is some software that intermingles them like that.

(*) I am considering being able to read a style file into splitter
so that you could much more accurately estimate the size of
the resulting files.  In which case you could know if a way was
a polygon in the given style.


More information about the mkgmap-dev mailing list