PostGIS

ST_IsSimple

Prev

8.4. Geometry Accessors

Next

Name

ST_IsSimple — Tests if a geometry has no points of self-intersection or self-tangency.

Synopsis

+boolean +ST_IsSimple(+`geometry `+geomA`)`;

Description

Returns true if this Geometry has no anomalous geometric points, such as self-intersection or self-tangency. For more information on the OGC’s definition of geometry simplicity and validity, refer to "Ensuring OpenGIS compliancy of geometries"

Note

SQL-MM defines the result of ST_IsSimple(NULL) to be 0, while PostGIS returns NULL.

check This method implements the SQL/MM specification. SQL-MM 3: 5.1.8

check This function supports 3d and will not drop the z-index.

Examples

 SELECT ST_IsSimple(ST_GeomFromText('POLYGON((1 2, 3 4, 5 6, 1 2))'));
 st_issimple
-------------
 t
(1 row)

 SELECT ST_IsSimple(ST_GeomFromText('LINESTRING(1 1,2 2,2 3.5,1 3,1 2,2 1)'));
 st_issimple
-------------
 f
(1 row)

See Also

Prev

Up

Next

ST_IsRing

Home

ST_M