Skip to main content
Returns the coordinate dimensions of the geometry. It is an alias of ST_NDims. ST_CoordDim

Signatures

ST_CoordDim(geom: Geometry)

Parameters

geom
Geometry
required
The input geometry.

Return type

An integer value.

Examples

SELECT ST_CoordDim(ST_GeomFromText('POINT(1 1 2)'))
3
Spark SQL Example with x, y coordinate:
SELECT ST_CoordDim(ST_GeomFromWKT('POINT(3 7)'))
2