Boost logo

Geometry :

Subject: Re: [geometry] Fwd: intersection of two polygons
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-07-01 16:14:05


Hi again,

On 1-7-2012 20:45, Barend Gehrels wrote:
> Hi Victor,
>
> On 22-6-2012 12:19, Botnev Victor wrote:
>> In addition I would specify versions of Boost where this behavior
>> appears. They are 1.48, 1.49 and 1.50beta.
>> ---------- Forwarded message ----------
>> From: *Botnev Victor* <botnev.victor_at_[hidden]
>> <mailto:botnev.victor_at_[hidden]>>
>> Date: 2012/6/21
>> Subject: intersection of two polygons
>> To: geometry_at_[hidden] <mailto:geometry_at_[hidden]>
>>
>>
>> Hi all, I have found the following problem.
>> There are two polygons in binary file in the attachment (One of them
>> contents few thousands of points and their listing would be too long).
>> I use Visual Studio 2008 and this file was written by a program which
>> was made by it.
>> The code presented in attachment read this file and try to intersect
>> the polygons. The result is wrong. I see it even from analyzing
>> bounding boxes: the bounding box of an intersection should be within
>> (or equal to) the intersection of the bounding boxes of given
>> polygons, but here it is not.
>
> I did have a closer look and can reproduce it, thanks for the versions
> (it indeed occurs still at 1.50).
>
> I can reproduce it also if I simplify it (a tiny bit) and use ttmath,
> so this one is (probably) not a FP-robustness issue.
>
> Hope to fix it soon.

It appears that the input polygon is invalid and takes the same path
forward and backward. This makes the issue the same as reported by
Volker (see e.g. my reply here:
http://boost-geometry.203548.n3.nabble.com/difference-algorithm-produces-invalid-polygon-tt3744240.html#a3802266
)

So it will be looked at but realize that the input is invalid (even
though correct has been called)

Regards, Barend



Geometry list run by mateusz at loskot.net