跳转至
🎉 Apache Sedona 1.9.1 已正式发布!🗺️ 新增 Geography SQL 函数、Box2D 与 Box3D 类型、栅格 Python UDF 等。查看发布说明 →

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