제목

ST_IsClosed — LINESTRING 의 시작점과 종단점이 일치하는 경우 TRUE 를 반환합니다. 다면체 표면이 닫혀 (부피를 가지고) 있는 경우 TRUE 를 반환합니다.

요약

boolean ST_IsClosed(geometry g);

설명

LINESTRING 의 시작점과 종단점이 일치하는 경우 TRUE 를 반환합니다. 다면체 표면의 경우, 다면체 표면이 면적(열림)을 가지고 있는지 부피(닫힘)를 가지고 있는지 알려줍니다.

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

This method implements the SQL/MM specification. SQL-MM 3: 7.1.5, 9.3.3

[참고]

SQL-MM defines the result of ST_IsClosed(NULL) to be 0, while PostGIS returns NULL.

This function supports 3d and will not drop the z-index.

This method supports Circular Strings and Curves.

개선 사항: 2.0.0 버전부터 다면체 표면(polyhedral surface)을 지원합니다.

This function supports Polyhedral surfaces.

라인스트링 및 포인트 예시

Code
SELECT ST_IsClosed('LINESTRING(0 0,1 1)'::geometry);
래스터 출력
f
Figure
Geometry figure for visual-st-isclosed-01
Code
SELECT ST_IsClosed('LINESTRING(0 0,0 1,1 1,0 0)'::geometry);
래스터 출력
t
Figure
Geometry figure for visual-st-isclosed-02
Code
SELECT ST_IsClosed('MULTILINESTRING((0 0,0 1,1 1,0 0),(0 0,1 1))'::geometry);
래스터 출력
f
Figure
Geometry figure for visual-st-isclosed-03
Code
SELECT ST_IsClosed('POINT(0 0)'::geometry);
래스터 출력
t
Code
SELECT ST_IsClosed('MULTIPOINT((0 0),(1 1))'::geometry);
래스터 출력
t

다면체 표면 예시

This example uses a cube.

Code
SELECT ST_IsClosed('POLYHEDRALSURFACE( ((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),
((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),
((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),
((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)),((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)) )');
래스터 출력
t
Figure
Geometry figure for visual-st-isclosed-06

This example uses the same cube with one side missing.

Code
SELECT ST_IsClosed('POLYHEDRALSURFACE( ((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),
       ((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),
       ((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),
       ((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)) )');
래스터 출력
f
Figure
Geometry figure for visual-st-isclosed-07

참고

ST_IsRing