Skip to content
🎉 Apache Sedona 1.8.1 is now available! Check out the new features and improvements.

ST_CoordDim

Introduction: Returns the coordinate dimensions of the geometry. It is an alias of ST_NDims.

Format: ST_CoordDim(geom: Geometry)

SQL Example with x, y, z coordinate:

SELECT ST_CoordDim(ST_GeomFromText('POINT(1 1 2'))

Output:

3

SQL Example with x, y coordinate:

SELECT ST_CoordDim(ST_GeomFromWKT('POINT(3 7)'))

Output:

2