Name

ST_NumPoints — Return the number of points in an ST_LineString or ST_CircularString value.

Synopsis

integer ST_NumPoints(geometry g1);

Description

Return the number of points in an ST_LineString or ST_CircularString value. Prior to 1.4 only works with Linestrings as the specs state. From 1.4 forward this is an alias for ST_NPoints which returns number of vertexes for not just line strings. Consider using ST_NPoints instead which is multi-purpose and works with many geometry types.

This method implements the OpenGIS Simple Features Implementation Specification for SQL.

This method implements the SQL/MM specification: SQL-MM 3: 7.2.4

Examples

SELECT ST_NumPoints(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'));
		--result
		4
		

See Also

ST_NPoints