Opened 17 months ago

#13014 new Bugs

buffer returns invalid geometries when used with asymmetric distances on the same side

Reported by: andre.meyer@… Owned by: Barend Gehrels
Milestone: To Be Determined Component: geometry
Version: Boost 1.62.0 Severity: Problem
Keywords: Cc:


Using buffer with distances (2/-1) or (-1/2) should generate a polygon that lies beside the original linestring.

But, since the direction is only determined for both sides (in buffer_inserter, checking negative() for the distance strategy, which returns only true if both sides are negative), the inner of both sides is calculated wrong.

Maybe buffer_inserter could check nageative() for each side separately, and only reverse one side before stitching both sides together?

Attachments (2)

Unbenannt.png (2.4 KB) - added by anonymous 17 months ago.
red is input linestring, yellow resulting buffer
buffer.png (8.5 KB) - added by anonymous 16 months ago.

Download all attachments as: .zip

Change History (2)

Changed 17 months ago by anonymous

Attachment: Unbenannt.png added

red is input linestring, yellow resulting buffer

Changed 16 months ago by anonymous

Attachment: buffer.png added
Note: See TracTickets for help on using tickets.