ST_IsSimple
Checks whether a geometry is simple, with no self-intersections or repeated points. Returns 1 if it is simple, 0 if not, and NULL for a NULL argument.
Syntax
ST_IsSimple(g)
IsSimple(g)Description
Returns 1 if the geometry g is simple, 0 if it is not, and NULL if g is NULL.
A geometry is simple if it has no anomalous geometric points, such as self-intersections or self-tangency:
A
POINTis always simple.A
LINESTRINGis simple if it does not cross or touch itself. A closedLINESTRING, whose first and last points are the same, is simple if it does not touch itself anywhere else.A
MULTIPOINTis simple if no two of its points are the same.
ST_IsSimple() and IsSimple() are synonyms.
Examples
A POINT is always simple.
SET @g = 'Point(1 2)';
SELECT ST_ISSIMPLE(GEOMFROMTEXT(@g));
+-------------------------------+
| ST_ISSIMPLE(GEOMFROMTEXT(@g)) |
+-------------------------------+
| 1 |
+-------------------------------+A LINESTRING that crosses itself is not simple:
A closed LINESTRING that does not cross itself is simple:
A MULTIPOINT with a repeated point is not simple:
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?

