Subject: [ggl] Multipolygon self intersection with of coincident edges
From: Barend Gehrels (barend)
Date: 2011-10-25 17:11:00
Thanks for your clear figures and code sample including WKT, this makes
On 25-10-2011 6:38, V D wrote:
> I'm looking at self-intersection problems when dealing with integer
> For example, the following 2 polygons as a multipolygon:
> They have a coincident edge, and therefore doing
> bg::intersects(this_multipolygon) will return true. Of course,
> bg::intersects() on each polygon individually is perfectly fine.
> Is there any way I could tweak this algorithm so that coincident edges
> are not considered as self intersection? (can't use algorithms on this
> kind of multipolygons right now because of that)
> Would this possibly break algorithms ? Should I simply deal with this
> kind of geometries as a vector of polygons and do algorithms 1 polygon
> at a time rather than the multipolygon concept ?
The bg::intersects returns true which is indeed correct. Though the
single-argument version is not OGC-compliant, it behaves as though it
operates on (in this case) two polygons which would return true.
If we would apply this single-argument overloading further you would be
helped. If there would be a single-argument bg::touches, it would return
true in your case, and if there would be a single-argument bg::overlaps,
it would return false because the interiors of the two do not overlap
So that would be a nice solution, I think. But it is not yet there (if
we have overlaps for the two polygons, the single-argument is relatively
You could call the single-argument per polygon, for some purposes this
will be a perfect solution. Then you know that all polygons do not
self-intersect. But of course they might mutually overlap then...
-------------- next part --------------
Skipped content of type multipart/related
Geometry list run by mateusz at loskot.net