oshdb icon indicating copy to clipboard operation
oshdb copied to clipboard

Incorrect geometry for (Multi)Polygon with hole touching shell at a shared point!

Open rtroilo opened this issue 1 year ago • 0 comments

related to #424.

A valid Polygon with a hole POLYGON((0 0,0 2,2 2,4 2,4 0,0 0),(2 2,1 1,3 1,2 2))

    lat
     ^
     |
     2   b --- c --- f
         |     /\    |
     1   |   d -- e  |
         |           |
     0   a --------- g
       
         0  1  2  3  4 -> lon
  
with ways:
   A: (a, b, c)
   B: (c, d)
   C: (d, e, c)
   D: (c, f, g, a)
   

Could produce wrongly a overlapping and invalid Multipolygon like MULTIPOLYGON (((2 2, 1 1, 3 1, 2 2)), ((0 0, 0 2, 2 2, 4 2, 4 0, 0 0))) for permutation B:(c, d)C:(d,e,c)A:(a,b,c)D:(c,f,g,a)

You will find a test at dbe4045

rtroilo avatar Nov 02 '22 22:11 rtroilo