ST_ISCLOSED
Syntax
ST_IsClosed(g)
IsClosed(g)
Description
Returns 1 if a given LINESTRING's start and end points are the same, or 0 if they are not the same.
ST_IsClosed()
and IsClosed()
are synonyms.
Examples
SET @ls = 'LineString(0 0, 0 4, 4 4, 0 0)';
SELECT ST_ISCLOSED(GEOMFROMTEXT(@ls));
+--------------------------------+
| ST_ISCLOSED(GEOMFROMTEXT(@ls)) |
+--------------------------------+
| 1 |
+--------------------------------+
SET @ls = 'LineString(0 0, 0 4, 4 4, 0 1)';
SELECT ST_ISCLOSED(GEOMFROMTEXT(@ls));
+--------------------------------+
| ST_ISCLOSED(GEOMFROMTEXT(@ls)) |
+--------------------------------+
| 0 |
+--------------------------------+
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?