Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Funzione
Si applica a:
Databricks Runtime 18.1 e versioni successive
Importante
Questa funzionalità è in Anteprima Pubblica.
Restituisce il numero di punti non vuoti nei valori di input GEOGRAPHY o GEOMETRY.
Questa funzione è un alias per st_npoints la funzione.
Sintassi
st_numpoints ( geoExpr )
Arguments
-
geoExpr: un valoreGEOGRAPHYoGEOMETRY.
Restituzioni
Un valore di tipo INT, che rappresenta il numero di punti non vuoti nel valore di input GEOGRAPHY o GEOMETRY.
La funzione restituisce NULL se l'input è NULL.
Examples
-- Returns the number of points in a non-empty multipoint geometry.
> SELECT st_numpoints(st_geomfromtext('MULTIPOINT(10 34,44 57,EMPTY)'));
2
-- Returns the number of points in an empty multipoint geometry.
> SELECT st_numpoints(st_geomfromtext('MULTIPOINT(EMPTY,EMPTY)'));
0
-- Returns the number of points in a non-empty polygon geometry.
> SELECT st_numpoints(st_geomfromtext('POLYGON((0 0,1 0,1 1,0 1,0 0))'));
5