Skip to main content
Returns the coordinate dimension of the geometry. ST_NDims

Signatures

ST_NDims(geom: Geometry)

Parameters

geom
Geometry
required
The input geometry.

Return type

An integer value.

Examples

SELECT ST_NDims(ST_GeomFromEWKT('POINT(1 1 2)'))
3
Spark SQL example with x,y coordinate:
SELECT ST_NDims(ST_GeomFromText('POINT(1 1)'))
2