제목

ST_NRings — 폴리곤 도형의 내곽 고리의 개수를 반환합니다.

요약

integer ST_NRings(geometry geomA);

설명

도형이 폴리곤 또는 멀티폴리곤인 경우 고리의 개수를 반환합니다. NumInteriorRings 함수와는 달리, 외곽 고리도 개수에 포함시킵니다.

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

This method supports Circular Strings and Curves.

예시

Code
SELECT ST_NRings(geom) As Nrings, ST_NumInteriorRings(geom) As ninterrings
FROM (SELECT 'POLYGON((1 2,3 4,5 6,1 2))'::geometry As geom) As foo;
래스터 출력
nrings | ninterrings
--------+-------------
      1 |           0
(1 row)
Figure
Geometry figure for visual-st-nrings-01