Boost logo

Geometry :

Subject: [ggl] Multipolygon self intersection with of coincident edges
From: V D (zedxz2)
Date: 2011-10-25 18:01:43


Makes sense, thanks for the follow-up.

-V

On Oct 25, 2011, at 10:22 AM, Barend Gehrels wrote:

> Hi,
>
> Thanks for your clear figures and code sample including WKT, this makes researching/responding easy.
>
>
> On 25-10-2011 6:38, V D wrote:
>>
>> Hi,
>>
>> I'm looking at self-intersection problems when dealing with integer multi-polygons.
>> For example, the following 2 polygons as a multipolygon:
>>
>> <Mail Attachment.png>
>>
>> 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 each other.
>
> 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 easy).
>
> 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...
>
> Regards, Barend
>
>
>
>
> _______________________________________________
> ggl mailing list
> ggl_at_[hidden]
> http://lists.osgeo.org/mailman/listinfo/ggl


Geometry list run by mateusz at loskot.net