ST_NumPoints
Prev | 8.4. Geometry Accessors | Next

## Name

ST_NumPoints — Returns the number of points in a LineString or CircularString.

## 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 linestrings. Consider using ST_NPoints instead which is multi-purpose and works with many geometry types.

This method implements the OGC Simple Features Implementation Specification for SQL 1.1.

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

Prev | Up | Next
ST_NumPatches | Home | ST_PatchN