Boost logo

Geometry :

Subject: [ggl] "touches" in boost.geometry?
From: Adam Wulkiewicz (adam.wulkiewicz)
Date: 2011-10-20 07:09:18


Mateusz ?oskot wrote:
> On 19 October 2011 23:15, Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]> wrote:
>> Mateusz Loskot wrote:
>>> It's imprecise, though it may be understood as self-contradicting.
>>>
>>> touches(A, B) is true if and only if
>>> intersect(interior(A), interior(B)) is empty
>>> and
>>> intersect(boundary(A), boundary(B)) is non-empty
>>>
>>> I think in terms of the DE-9IM and I believe it's a good
>>> idea to consider or DE-9IM ?as basis of all the geometric
>>> relation predicates. It's a generic technique.
>>
>> It would definietly increase expressiveness of GGL. I feel lack of some
>> functions describing relations between geometires. In terms of geometries
>> which are interiors+boundires there is no touches()/meets() and this
>> intersects_without_boundry() i mentioned earlier. And in terms of boundries
>> we have only overlaps().
>>
>> It would be nice if default versions of algorithms worked on geometries
>> (interiors+boundries) and there would be additional wrappers to pass
>> specific parts of the geometry.
>>
>> But is it possible with current design of GGL Barend?
>
> Yes, I'd let Barend to answer/decide as it's quite substantial issue
> for overall library.
>
> There could be an utility that calculates the intersection matrix for
> geometries anyway.
> And a generic relate(A, B) predicate resulting in the intersection
> matrix configuration.

It seems I previously have sent my reply to Mateusz only. Sorry for
inconvenience.

I've forgotten about one function - disjoint_with_boundry(). Of course
names I've used are just examples. Ideally we would have one function
and template/function parameters would describe the relationship. I
recall that we talked about it earlier and that the first template
parameter can't be used to achieve this goal:

intersects<without_boundry>(A, B); // impossible

But it probably is possible to pass wrapped geometries. Passing them
should allow us to express various relationships and it can be
implemented using existing interface.

Regards,
Adam


Geometry list run by mateusz at loskot.net