Modify

#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@… 21 months ago.
Demo source for the union_ bug

Download all attachments as: .zip

Change History (3)

Changed 21 months ago by max@…

Attachment: union_bug.cxx added

Demo source for the union_ bug

comment:1 Changed 21 months ago by anonymous

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 Changed 20 months ago by Barend Gehrels

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Barend Gehrels.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.