नोट
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप साइन इन करने या निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
Applies to:
Databricks Runtime 18.1 and above
Important
This feature is in Public Preview.
Returns the number of non-empty points in the input GEOGRAPHY or GEOMETRY value.
This function is an alias for st_npoints function.
Syntax
st_numpoints ( geoExpr )
Arguments
geoExpr: AGEOGRAPHYorGEOMETRYvalue.
Returns
A value of type INT, representing the number of non-empty points in the input GEOGRAPHY or GEOMETRY value.
The function returns NULL if the input is 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