Boost logo

Geometry :

Subject: [ggl] Intersection of two polygons returning empty result
From: Phillip Seaver (gtflip)
Date: 2011-06-28 13:17:01


Hi,

I think I found a bug in intersection(). I have two polygons for which
intersects() correctly returns true, but intersect() results in an empty
multi-polygon instead of the intersection:

537.99678544791459, 124.30517362077681
437.36539413622404, 142.02728895075373
456.33031803043468, 249.50296671450121
556.96217263181723, 231.78347688272990
537.99678544791459, 124.30517362077681

and

437.35, 142.03
461.94, 281.32
564.5, 263.26
539.9, 123.97
437.35, 142.03

The first polygon is the result of intersecting several other polygons,
which is why there are so many numbers after the decimal place. When I cut
it down to two numbers after the decimal, it worked correctly.

(These polygons are all from a PDF file. Each time you set a clipping path
in a PDF, the result is the intersection of the current clipping path
and the new path)

I also have a relatively short program that intersects those polygons, if
you want it. I updated my copy from the boost trunk from this morning after
finding the problem. It occurred with the older code and the newer code.

Thanks,

Phillip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20110627/ce4856f8/attachment.html


Geometry list run by mateusz at loskot.net