Poznámka:
Přístup k této stránce vyžaduje autorizaci. Můžete se zkusit přihlásit nebo změnit adresáře.
Přístup k této stránce vyžaduje autorizaci. Můžete zkusit změnit adresáře.
Platí pro:
Kontrola SQL Databricks
Databricks Runtime 17.1 a vyšší
Poznámka:
Tato funkce není k dispozici ve skladech Databricks SQL Classic. Další informace o službě Databricks SQL Warehouse najdete v tématu Typy SQL Warehouse.
Vrátí počet geometrií ve vstupní GEOMETRY hodnotě.
Syntax
st_numgeometries ( geoExpr )
Arguments
-
geoExpr: HodnotaGEOMETRY.
Returns
Hodnota typu INTpředstavující počet geometrií ve vstupní GEOMETRY hodnotě.
Funkce vrátí NULL , pokud je NULLvstup .
Examples
-- Returns the number of geometries in a non-empty multipoint geometry.
> SELECT st_numgeometries(st_geomfromtext('MULTIPOINT(10 34,44 57,EMPTY)'));
3
-- Returns the number of geometries in an empty polygon geometry.
> SELECT st_numgeometries(st_geomfromtext('POLYGON EMPTY'));
0
-- Returns the number of geometries in a non-empty polygon geometry.
> SELECT st_numgeometries(st_geomfromtext('POLYGON((0 0,1 0,1 1,0 1,0 0))'));
1
-- Returns the number of geometries in a non-empty geometry collection.
> SELECT st_numgeometries(st_geomfromtext('GEOMETRYCOLLECTION(LINESTRING EMPTY,GEOMETRYCOLLECTION(POINT(1 2),POLYGON((0 0,1 0,0 1,0 0))))'));
2