Boost logo

Geometry :

Subject: [ggl] is_simple is_valid
From: Barend Gehrels (Barend.Gehrels)
Date: 2009-10-06 17:20:24


Hi,

>>>>
>>>> According to OGC: IsSimple (): Integer Returns 1 (TRUE) if this
>>>> geometric object has no anomalous geometric points, such as self
>>>> intersection or self tangency. The description of each instantiable
>>>> geometric class will include the specific conditions that cause an
>>>> instance of that class to be classified as not simple.
>>>>
>>>> [...]
>> Thanks for the link. Martin explains: /"It states that Polygons are
>> always simple geometries (sec. 2.1.10)."/ and indeed I now find the
>> statement /polygons are simple geometric objects/. Seems to me
>> contratictory, but OK.
>>
>
> I can't see any contradiction in the two statements.
>
Sorry, I was not clear. I meant in the statements "/has no anomalous
geometric points, such as self
intersection or self tangency/" and /"polygons are simple geometric
objects/".

> My analysis that AFAIK conforms PostGIS and other implemenations of OGC:
>
> 1. There is no guarantee to return correct results for invalid
> geometries.
>
> 2. This polygon is invalid because it's self-intersecting,
>
> 3. The implication based on 1 and 2 is that the reported "true" result
> shall be considered as "undefined result".
>
> Undefined is...undefined, what means it may make sense or not. Just as
> undefined behaviour in C++ :)
>
Thanks for all your research-work and communcations with the postgis
team. It is clear now. In other words: Self-intersecting polygons are
not valid and therefore it cannot be determined if they are simple. And
if they are valid, well, then they are of course simple... Linestrings
are always valid and therefore they can be checked on
self-intersections, if not found they are simple.

I understand the reasoning. However it is still amazing how such
reasoning works out into contradictory behaviour...

>
>> Or maybe better, but less conformant: intersects(geometry) -> true for
>> both linestring and polygon. [...]
>>
>
> Sure, good idea.
>
>
Cool, I still think that it is indeed the best option.

Regards, Barend

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20091006/92f45eda/attachment.html


Geometry list run by mateusz at loskot.net