geometry icon indicating copy to clipboard operation
geometry copied to clipboard

An unrelated input polygon vertex disappeared after a union operation

Open mcquay239 opened this issue 7 years ago • 0 comments

When uniting the following two polygons A: POLYGON((-8 0,-10 0,-10 4,10 4,10 0,8 0,4 0,0 0,-8 0)) B: POLYGON((0 2,4 2,4 0,4 -2,0 -2,0 0,0 2))

The union result is MULTIPOLYGON(((4 -2,0 -2,0 0,-8 0,-10 0,-10 4,10 4,10 0,4 0,4 -2)))

But the expected result is MULTIPOLYGON(((4 -2,0 -2,0 0,-8 0,-10 0,-10 4,10 4,10 0,8 0,4 0,4 -2)))

The vertex POINT(8 0) was erased by a call to detail::overlay::append_no_collinear inside of travel_to_next_turn. The expectation is that any input vertex lying on the result boundary must be a result vertex.

AFAIU, the problem was introduced in d0ca69a058. And according to the commit message the expected invariant holds.

image

mcquay239 avatar Jun 21 '18 11:06 mcquay239