Name

ST_IsRing — Tests if a LineString is closed and simple.

Synopsis

boolean ST_IsRing(geometry g);

설명

해당 LINESTRINGST_IsClosed (ST_StartPoint(g) ~= ST_Endpoint(g)) 인 동시에 ST_IsSimple 인 (자체 교차하지 않는) 경우 TRUE 를 반환합니다.

This method implements the OGC Simple Features Implementation Specification for SQL 1.1.

2.1.5.1

This method implements the SQL/MM specification.

SQL-MM 3: 7.1.6

[Note]

SQL-MM은 ST_IsRing(NULL) 의 결과를 0으로 정의하지만, PostGIS는 NULL 을 반환합니다.

예시

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)

참고

ST_IsClosed, ST_IsSimple, ST_StartPoint, ST_EndPoint