Skip to main content
Returns the number of points (vertices) in a geography object. ST_NPoints on a global polyline with 4 vertices

Signatures

ST_NPoints (A: Geography)

Parameters

A
Geography
required
The geography whose vertices are counted.

Return type

The number of vertices in the geography.

Example

SELECT ST_NPoints(ST_GeogFromWKT('LINESTRING (0 0, 1 1, 2 2)'));
3