
Geometry : 
Subject: [ggl] is_simple is_valid
From: Barend Gehrels (Barend.Gehrels)
Date: 20091003 05:24:34
Hi,
I'm looking at selfintersections to implement the function is_simple
(based on blocks we already have). But I'm what confused about the name.
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.
JTS says: Valid polygonal geometries are simple by definition, so
isSimple trivially returns true.
(http://www.vividsolutions.com/JTS/javadoc/com/vividsolutions/jts/geom/Geometry.html#isSimple()
)
The PostGIS implementation give TRUE back to all selfintersecting
polygons that I try. The function isvalid returns false for
selfintersecting polygons.
SQL Server throws for issimple at selfintersections:
System.ArgumentException: 24144: This operation cannot be completed
because the instance is not valid. Use MakeValid to convert the instance
to a valid instance. Note that MakeValid may cause the points of a
geometry instance to shift slightly.
System.ArgumentException:
at Microsoft.SqlServer.Types.SqlGeometry.ThrowIfInvalid()
at Microsoft.SqlServer.Types.SqlGeometry.STIsSimple()
.
So it is often called isvalid (or is_valid). But I cannot find that in
OGC specs (looked a.o. in 06103r3 (still candidate?))
So I probably overlook something somewhere...
Regards, Barend
Geometry list run by mateusz at loskot.net