Skip to main content
Returns the number of sub-geometries in a geography object. Returns 1 for single geometries (Point, LineString, Polygon).

Signatures

ST_NumGeometries (A: Geography)

Parameters

A
Geography
required
The geography whose sub-geometries are counted.

Return type

The number of sub-geometries (1 for single geometries).

Example

SELECT ST_NumGeometries(ST_GeogFromWKT('MULTIPOINT ((0 0), (1 1), (2 2))'));
3