st_numinteriorrings Fonction

S’applique à :coché oui Databricks SQL coché oui Databricks Runtime 17.3 et versions ultérieures

Important

La prise en charge des valeurs GEOGRAPHY est disponible en préversion publique. La prise en charge des valeurs GEOMETRY est généralement disponible.

Note

Cette fonctionnalité n’est pas disponible sur les entrepôts Databricks SQL Classic. Pour en savoir plus sur les entrepôts SQL Databricks, consultez les types d’entrepôts SQL.

Retourne le nombre d’anneaux intérieurs du polygone d’entrée.

Syntaxe

st_numinteriorrings ( geoExpr )

Arguments

  • geoExpr: Une valeur GEOGRAPHY ou GEOMETRY.

Retours

Un INTEGER qui spécifie le nombre d’anneaux intérieurs dans le polygone d’entrée.

Remarques

La fonction retourne NULL si l’entrée est NULL.

Conditions d’erreur

Examples

-- Example taking an empty 2D polygon GEOMETRY.
> SELECT ST_NumInteriorRings(ST_GeomFromText('POLYGON EMPTY', 4326));
  0
-- Example taking a 3DZ polygon GEOGRAPHY with one non-empty ring.
> SELECT ST_NumInteriorRings(ST_GeogFromText('POLYGON Z ((0 0 6,1 0 6,1 1 8,0 1 6,0 0 6))'));
  0
-- Example taking a 4D polygon GEOMETRY with two rings.
> SELECT ST_NumInteriorRings(ST_GeomFromText('POLYGON ZM ((0 0 111 -11,10 0 222 -22,0 10 333 -33,0 0 444 -44),(1 1 555 -55,4 1 666 -66,1 4 777 -77,1 1 888 -88))', 4326));
  1
-- Example taking a 3DM polygon GEOGRAPHY with three rings.
> SELECT ST_NumInteriorRings(ST_GeogFromText('POLYGON M ((0 0 1,10 0 2,0 10 3,0 0 1),(1 1 2,2 1 3,1 2 4,1 1 2),(3 3 3,3 2 4,2 3 5,3 3 3))'));
  2