跳转至
🎉 SedonaDB 0.4.0 已正式发布!🗺️ 新增 Python DataFrame API、R dplyr 接口、Geography 支持及 GPU 加速空间连接。阅读发布博客 →

ST_NDims

Introduction: Returns the coordinate dimension of the geometry.

ST_NDims

Format: ST_NDims(geom: Geometry)

Return type: Integer

Since: v1.3.1

Example with z coordinate:

SELECT ST_NDims(ST_GeomFromEWKT('POINT(1 1 2)'))

Output:

3

Example with x,y coordinate:

SELECT ST_NDims(ST_GeomFromText('POINT(1 1)'))

Output:

2