ST_CoordDim¶
Introduction: Returns the coordinate dimensions of the geometry. It is an alias of ST_NDims.
Format: ST_CoordDim(geom: Geometry)
Since: v1.5.0
Spark SQL Example with x, y, z coordinate:
SELECT ST_CoordDim(ST_GeomFromText('POINT(1 1 2'))
Output:
3
Spark SQL Example with x, y coordinate:
SELECT ST_CoordDim(ST_GeomFromWKT('POINT(3 7)'))
Output:
2