ST_IsRing — 测试 LineString 是否闭合且简单。
boolean ST_IsRing(
geometry g)
;
如果此 LINESTRING
同时 ST_IsClosed (ST_StartPoint(
g
)~=
ST_Endpoint(
) 和 ST_IsSimple(不自我相交),则返回 g
)TRUE
。
此方法实现了 OGC 简单要素 SQL 1.1 实施规范。
2.1.5.1
此方法实现了 SQL/MM 规范。
SQL-MM 3: 7.1.6
SQL-MM 将 |
SELECT ST_IsRing(geom), ST_IsClosed(geom), ST_IsSimple(geom) FROM (SELECT 'LINESTRING(0 0, 0 1, 1 1, 1 0, 0 0)'::geometry AS geom) AS foo; st_isring | st_isclosed | st_issimple -----------+-------------+------------- t | t | t (1 row) SELECT ST_IsRing(geom), ST_IsClosed(geom), ST_IsSimple(geom) FROM (SELECT 'LINESTRING(0 0, 0 1, 1 0, 1 1, 0 0)'::geometry AS geom) AS foo; st_isring | st_isclosed | st_issimple -----------+-------------+------------- f | t | f (1 row)