Opened 6 years ago

#12347 new Bugs

linestring and polygon intersection wrong answer

Reported by: Anton Kovalev <anton.kovalev.239@…> Owned by: Barend Gehrels
Milestone: To Be Determined Component: geometry
Version: Boost 1.60.0 Severity: Problem
Keywords: linestring, polygon, intersection Cc:

Description

LINESTRING(1 -1, 1 0, 1 1) and POLYGON((0 0, 0 2, 2 2, 2 0, 1 0, 0 0)) intersection is LINESTRING(1 -1, 1 0, 1 1) for integer coordinate type. Test code is attached.

I beleive that's because of middle point of ((1 -1), (1, 0)) segment is (1, 0) :(

Attachments (1)

test.cpp (1.0 KB ) - added by Anton Kovalev <anton.kovalev.239@…> 6 years ago.
test file reproducing this bug

Download all attachments as: .zip

Change History (1)

by Anton Kovalev <anton.kovalev.239@…>, 6 years ago

Attachment: test.cpp added

test file reproducing this bug

Note: See TracTickets for help on using tickets.