Nome

ST_NRings — Retorna o número de anéis interiores de um polígono.

Sinopse

integer ST_NRings(geometry geomA);

Descrição

Se a geometria for um polígono ou multi polígono, retorna o número de anéis. Diferente do NumInteriorRings, esse conta os anéis de fora também.

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

This method supports Circular Strings and Curves.

Exemplos

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;
Raster Outputs
nrings | ninterrings
--------+-------------
      1 |           0
(1 row)
Figure
Geometry figure for visual-st-nrings-01

Veja também

ST_NumInteriorRings