Compartilhar via


st_interiorringn Função

Aplica-se a:check marked yescheck marked yes Databricks Runtime 17.3 and above

Importante

Esse recurso está em Visualização Pública.

Retorna o n-ésimo anel interior do polígono de entrada como uma linestring.

Sintaxe

st_interiorringn ( geoExpr, indexExpr )

Arguments

  • geoExpr: Um valor GEOGRAPHY ou GEOMETRY.
  • indexExpr: um INTEGER valor que representa a posição baseada em 1 da linhagem no polígono.

Devoluções

O anel interior do polígono no índice indexExpr baseado em 1 como uma linha de segmentos fechada. O valor de saída tem o mesmo tipo de dados e SRID que geoExpr.

Anotações

A função retorna NULL se a entrada for NULL.

Condições de erro

Exemplos

-- Example taking a 2D polygon GEOMETRY with three interior rings.
> SELECT ST_AsEWKT(ST_NumInteriorRings(ST_GeomFromText('POLYGON((0 1,10 5,4 20,0 1),(3 12,9 7,5 13,3 12),(1 4,7 5,6 8,1 4),(3 6,4 11,2 10,3 6))', 3857), 3));
  SRID=3857;LINESTRING(3 6,4 11,2 10,3 6)
-- Example taking a 3DM polygon GEOGRAPHY with two interior rings.
> SELECT ST_AsEWKT(ST_NumInteriorRings(ST_GeogFromText('POLYGON M ((0 1 111,10 5 222,4 20 333,0 1 444),(3 12 111,9 7 222,5 13 333,3 12 444),(1 4 111,7 5 222,6 8 333,1 4 444))'), 2));
  SRID=4326;LINESTRING M (1 4 111,7 5 222,6 8 333,1 4 444)
-- Example taking a 4D polygon GEOMETRY with one interior ring.
> SELECT ST_AsEWKT(ST_NumInteriorRings(ST_GeomFromText('POLYGON ZM ((0 1 111 -11,10 5 222 -22,4 20 333 -33,0 1 444 -44),(3 12 111 -11,9 7 222 -22,5 13 333 -33,3 12 444 -44))'), 1));
  LINESTRING ZM (3 12 111 -11,9 7 222 -22,5 13 333 -33,3 12 444 -44)