logo separator

[mkgmap-dev] low-res-opt branch: error message from ShapeSplitter for self-intersecting multipolygon

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Mon Jun 14 09:19:25 BST 2021

Hi Gerd

Any form of self-intersection might cause problems to ShapeSplitter.
Not sure what you mean by "connected hole visited.." - I presume
something like the outer edge of the shape is clockwise, with a cut
leading to a hole that is also clockwise; for this to happen the in/out
lines from the edge to the hole conceptually cross.

I'm just running low-res-opt on BritishIsles with ShapeMergeFilter
maxPoints=65535 to see if I can get a problem to work on. What is your
test area?

Also, the latest development versions of the suspect code areas are in
different branches. Should I attempt to have a composite with the
faster-mp bits of MP handling and low-res-opt version of
ShapeMergeFilter?

Your attached example looks OK and I wouldn't have expected it to cause
any difficulties for the later versions of ShapeSplitter. A possible
difficulty might be an almost horizontal line close to the in/out lines
to the lower shape. I hope my attempt to allow a bit of tolerance where
calculated points on the cut-line end up 1/2 HP units the wrong way
round isn't causing other problems. Do you have this as an example I
can test?

Ticker
   

On Sun, 2021-06-13 at 14:17 +0000, Gerd Petermann wrote:
> Hi Ticker,
> 
> OK, my current understanding is that ShapeSplitter may fail to split
> 8-like shapes or shapes where the connected hole is visited in the
> "wrong" direction. Those problem cases are possibly created by
> 1) MultipolygonRelation.joinways()
> 2) MultipolygonCutter
> 3) ShapeMergeFilter (maybe)
> 
> Do you see a way to avoid them in those routines? Attached is another
> example that doesn't work.
> 
> Gerd



More information about the mkgmap-dev mailing list