Name

ST_IsSimple — Tests if a Geometry has no anomalous geometric points, such as self intersection or self tangency.

Synopsis

boolean ST_IsSimple(bytea Geometry);

Alias

IsSimple

Description

Tests if a Geometry has no anomalous geometric points, such as self intersection or self tangency. If the Geometry is Simple, then returns TRUE. If the Geometry is an empty set, then returns null. Otherwise return False.

Coordinate Dimensions
2D3DM

-

-

Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
2.1.1.17.2.10.17.2.8.25.1.8

Examples

SELECT ST_IsSimple(ST_GeomFromText('MULTIPOINT(0 0 5, 2 2 8)'));
--Result
TRUE

SELECT ST_IsSimple(ST_GeomFromText('MULTIPOINT(0 0 5, 2 2 8, 0 0 8)'));
--Result
FALSE

SELECT IsSimple(ST_GeomFromText('LINESTRING (0 0, 10 10, 20 10, 10 10)'));
--Result
FALSE

SELECT ST_IsSimple(ST_GeomFromText('POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0), (2 2, 2 4, 4 4, 4 2, 2 2))'));
--Result
TRUE

SELECT ST_IsSimple(ST_GeomFromText('POINT EMPTY'));
--Result
null

Related functions

ST_IsValid