logo separator

[mkgmap-dev] tile takes very long time to generate

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Tue Mar 30 14:17:13 BST 2021

Hi Gerd

I'm revising my opinion about considering the geometry to determine
inner and outer.  All the different BitSets, containsMatrix etc logic
is too complex, and if it then conflicts with the explicit definition
of the MP it just gets worse.

I'd simpify it along these lines:

 split the polygon/joinedWay list:
   error: the explicit conflicting inner/outer
   inners: at least one inner element
   outers: all the rest

 for each inner
   find a larger_area outer that contains a part of it
     add to the outer.listOfInners
     error if more than one

 for each outer
   cut out listOfInners
   apply tags
   output to the wayMap

This copes correctly with outer	with inner hole	that
contains another outer. If, in the above logic, more than one larger
outer is found, then choosing the smallest would allow this nesting to
any level.


On Thu, 2021-03-18 at 10:21 +0000, Gerd Petermann wrote:
> Hi all,
> I still struggle with the unit test because it's hard to say what we
> want to get in special cases.
> The current code doesn't really work in the way that I expected. I
> always thought that roles like "inner" and "outer" are completely
> ignored and that mkgmap calculates and uses the correct roles. This
> is only partly true. See attached file with MP were a forest contains
> a lake that contains a forest.
> For a nested polygon where the innermost ring has wrong role "inner"
> this doesn't work as expected. The forest  in the lake is ignored.
> With the correct role "outer" it is not ignored. No idea if this is
> intended or an error. Fortunately nested MP are very rare.
> Gerd

More information about the mkgmap-dev mailing list