Skip to content
πŸŽ‰ SedonaDB 0.4.0 is out now! πŸ—ΊοΈ Python DataFrame API, R dplyr, Geography support & GPU-accelerated spatial joins. Read the release blog β†’

ST_CoordDim

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

ST_CoordDim

Format: ST_CoordDim(geom: Geometry)

Return type: Integer

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