ST_NRings — ポリゴンジオメトリのリング数を返します。
integer ST_NRings(geometry geomA);
integer ST_NRings(
)
ジオメトリがポリゴンまたはマルチポリゴンの場合、リング数を返します。NumInteriorRingsと違い、外環も数えます。
This function supports 3d and will not drop the z-index.
This method supports Circular Strings and Curves
SELECT ST_NRings(the_geom) As Nrings, ST_NumInteriorRings(the_geom) As ninterrings FROM (SELECT ST_GeomFromText('POLYGON((1 2, 3 4, 5 6, 1 2))') As the_geom) As foo; nrings | ninterrings --------+------------- 1 | 0 (1 row)
ST_NumInteriorRings