ST_IsSimple — Tests if a Geometry has no anomalous geometric points, such as self intersection or self tangency.
boolean ST_IsSimple(
bytea
Geometry)
;
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.
2D | 3D | M |
---|---|---|
- | - |
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.1 | 7.2.10.1 | 7.2.8.2 | 5.1.8 |
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