ST_IsClosed(g) IsClosed(g)
Returns 1 if a given LINESTRING's start and end points are the same, or 0 if they are not the same. Before MariaDB 10.1.5, returns NULL if not given a LINESTRING. After MariaDB 10.1.5, returns -1.
ST_IsClosed()
and IsClosed()
are synonyms.
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 | +--------------------------------+
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/st_isclosed/