Boost logo

Geometry :

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

Mateusz ?oskot wrote:
> 2011/10/20 Adam Wulkiewicz<adam.wulkiewicz_at_[hidden]>:
>> I've forgotten about one function - disjoint_with_boundry().
> It's unclear to me what you mean here.
> If you mean geometries A and B are disjoint but with possible intersection of
> their boundaries, then it is OGC touches()
>> 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
> I'm a GIS boy, so forgive me if I'm biased, but it is easier for me to
> speak my language.
> I sense you mean this (note, it is not OGC contains, but a distinct refinement):
> Do we agree?

Unfortunately I'm not ;) If I understand correctly ST_ContainsProperly()
works like GGL's within(). I have something else in mind. If we have two
objects in space they intersects each other. If we move them in opposite
directions they will finally be in the point where only boundries
touches themselves. Existing implementation of intersects will return
true in this border case. It would be nice to have function that returns
false. The same with disjoint.
    ___ ___
   | | |
  _|_A | B |
| |_|_|___|
| C |

intersects(A, B) -> true
intersects(A, C) -> true

alternative_intersects(A, B) -> false
alternative_intersects(A, C) -> true

disjoint(A, B) -> false
disjoint(A, C) -> false

alternative_disjoint(A, B) -> true
alternative_disjoint(A, C) -> false

touches(A, B) -> true
touches(A, C) -> false
// or meets()

Or something like that...


Geometry list run by mateusz at