Opened 7 years ago

Closed 7 years ago

#11984 closed Bugs (fixed)

union_() generates self-intersecting polygon

Reported by: max@… Owned by: Barend Gehrels
Milestone: Boost 1.61.0 Component: geometry
Version: Boost 1.60.0 Severity: Problem
Keywords: Cc:

Description

I have a program which generates unions of a multipolygon and a ring. Sometimes, I have an identical point in the two shapes. The union_ result is a self-intersecting polygon.

Demo source attached. Output with Boost 1.58 and 1.60:

input multipolygon is valid input ring is valid result multipolygon is invalid: Geometry has invalid self-intersections. A self-intersection point was found at (-95, 60); method: t; operations: i/i; segment IDs {source, multi, ring, segment}: {0, 0, -1, 3}/{0, 0, -1, 6}

Attachments (1)

union_bug.cxx (2.6 KB ) - added by max@… 7 years ago.
Demo source for the union_ bug

Download all attachments as: .zip

Change History (3)

by max@…, 7 years ago

Attachment: union_bug.cxx added

Demo source for the union_ bug

comment:1 by anonymous, 7 years ago

I think the problem is not union_() - the correct result is a polygon that "touches" itself (but does not actually intersect), and that's what union_() does. The problem may just be a false negative in is_valid().

comment:2 by Barend Gehrels, 7 years ago

Milestone: To Be DeterminedBoost 1.61.0
Resolution: fixed
Status: newclosed

Thanks for the report. It is fixed in the branch feature/cluster_touch

  • still hope to get it in 1.61 because it fixes more issues
Note: See TracTickets for help on using tickets.