Returns the number of points in a LineString or CircularString geometry object.
Syntax
integer ST_NumPoints(geometry g1);Parameters
| Parameter | Description |
|---|---|
g1 | The geometry object. |
Description
ST_NumPoints is an alias for ST_NPoints. Use ST_NPoints instead — it can be used in multiple scenarios and works with many types of geometry objects, not just LineString and CircularString.
Examples
SELECT ST_NumPoints('LineString(0 0,0 1,1 1)'::geometry);
st_numpoints
--------------
3
(1 row)该文章对您有帮助吗?