Boost logo

Geometry :

Subject: Re: [geometry] within(Poly, Poly)
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2013-09-27 08:50:02


Barend Gehrels wrote:
> Hi,
>
>
> On 26-9-2013 23:45, Adam Wulkiewicz wrote:
>>
>>
>>>> 2. those are potentially ok:
>>>> a) t+uu, m+uu (see: '2 within t,uu.svg', '2 not within
>>>> t,uu.svg', '2 within m,uu.svg')
>>>> b) t+cc, m+cc (see: '2 [not] within (t|m),cc.svg')
>>>> So I think that for those I also need to check if points of
>>>> touching segments are inside. But is it sufficient? Probably yes
>>>> assuming the 'no crossing' policy (point 4) is used.
>>>
>>> - uu is normally discarded. But it gives sometimes extra (necessary)
>>> information and therefore it is still generated. In 2-not-within it
>>> gives this information: there is one intersection point, uu, nothing
>>> more -> we know that one is not inside of the other, so we can
>>> return false
>>
>> I must disagree here, see e.g. attached traverse_intersection_52. The
>> containing polygon may touch itself and the contained polygon may be
>> touching the first one in the same point but still be within it.
>
> That is right but I wrote (at least I meant, let met add "only"): if
> there is *only* one intersection point, uu, nothing more... If there
> is anything more than uu, we can discard it, its information is useless.

Ok, or if there are few intersection points and all are uu
(traverse_intersection_40).

Regards,
Adam





Geometry list run by mateusz at loskot.net