This topic describes the ST_NumPoints function. If the input geometry object is a LineString or CircularString object, this function returns the number of points of the input geometry object.
Syntax
integer ST_NumPoints(geometry g1);
Parameters
Parameter | Description |
---|---|
g1 | The geometry object that you want to specify. |
Description
- This function is the alias of the ST_NPoints function.
- We recommend that you use the ST_NPoints function, which can be used in multiple scenarios and can work with many types of geometry objects.
Examples
SELECT ST_NumPoints('LineString(0 0,0 1,1 1)'::geometry);
st_numpoints
--------------
3
(1 row)