Modify

Opened 4 months ago

#13494 new Bugs

polygon intersection fails

Reported by: lehnert@… Owned by: Barend Gehrels
Milestone: To Be Determined Component: geometry
Version: Boost 1.66.0 Severity: Showstopper
Keywords: geometry intersection Cc:

Description

Hello,

executing the following polygon intersection produces an empty result although the second operand is completely inside the first.

Code snippet:

using point_type = boost::geometry::model::d2::point_xy<double>; using polygon = boost::geometry::model::polygon<point_type>; using multi_polygon = boost::geometry::model::multi_polygon<polygon>;

polygon op1, op2; multi_polygon result;

boost::geometry::read_wkt("POLYGON((-1.99900000000000011 -0.889961757413527343,-1.99900000000000011 -1.12178395051169733,-1.89792526415373097 -1.49900000000000011,-1.8358086947169705 -1.49900000000000011,-1.99900000000000011 -0.889961757413527343))", op1); boost::geometry::read_wkt("POLYGON((-1.97591538973459313 -1.20793688888334905,-1.92415157993614439 -1.40112205701807624,-1.8661960316547388 -1.38559291465704759,-1.91795984145318754 -1.19240774652231996,-1.97591538973459313 -1.20793688888334905))", op2); boost::geometry::intersection(op1, op2, result);

I could track down the problem to the intersection/touch part. We use the intersection code quite heavily and such a constellation can occur frequently in our application. (I could present several more sample data for this bug). Therefore I set this to showstopper. Also I found other entries which look quite similar.

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Barend Gehrels.

Add Comment


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

 
Note: See TracTickets for help on using tickets.