Geometry :

Subject: Re: [geometry] boost::geometry::difference problem
From: horiuchi (account.h.horiuchi_at_[hidden])
Date: 2012-10-09 09:02:17

Hi,

There is no way I would support and measures?
**Since the story is pretty basic operation,
We understand that the impact is strong.

Best Regards.
h2

(2012/09/15 16:38), Barend Gehrels wrote:
> Hi,
> Sorry - I'm off, have to answer this next weekend.
> Regards, Barend
>
> On 14-9-2012 15:54, h2 wrote:
>> Hi.
>>
>> I am troubled by funny behavior of boost::geometry::difference.
>> Two cases below should be the same, but a different result comes back.
>>
>> *OK
>> geometry1 MULTIPOLYGON(((-2 5, -1 5, 0 5, 2 5, 2 -2, 1 -2, 1 -1, 0 -1,
>> 0 0, -1 0, -2 0, -2 5)))
>> geometry2 MULTIPOLYGON(((0 0, 1 0, 1 -1, 0 -1, 0 0)), ((-1 5, 0 5, 0
>> 0, -1 0, -1 5)))
>> output MULTIPOLYGON(((0.0 5.0,2.0 5.0,2.0 -2.0,1.0 -2.0,1.0 -1.0,1.0
>> 0.0,0.0 0.0,0.0 5.0)),((-1.0 5.0,-1.0 0.0,-2.0 0.0,-2.0 5.0,-1.0
>> 5.0)))
>>
>> *NG
>> geometry1 MULTIPOLYGON(((-2 5, -1 5, 0 5, 2 5, 2 -2, 1 -2, 1 -1, 0 -1,
>> 0 0, -1 0, -2 0, -2 5)))
>> geometry2 MULTIPOLYGON(((-1 5, 0 5, 0 0, -1 0, -1 5)), ((0 0, 1 0, 1
>> -1, 0 -1, 0 0)))
>> output MULTIPOLYGON(((-1.0 5.0,-1.0 0.0,-2.0 0.0,-2.0 5.0,-1.0 5.0)))
>>
>> As for the difference of both, polygon order of geometry2 is only
>> reversed.
>>
>> I traced a program,
>> Was found to be a pattern that is not supported by
>> boost::geometry::detail::overlay::sort_in_cluster::operator().
>> (geometry/algorithms/detail/overlay/handle_tangencies.hpp)
>>
>> The pattern that developed is "ix/xi".
>>
>> Will you know a correspondence method for this behavior?
>> If there is advice, I am happy,
>> and sorry for my english (not a native speaker. Therefore, I'm using a