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

ST_H3ToPoint

Introduction: Returns the center of an H3 cell as a point geometry. This uses H3's cell center, which can differ from the centroid of the cell polygon because of the grid projection.

Coordinates are longitude/latitude (X/Y) in degrees. The result has SRID 0, consistent with ST_H3ToGeom. To assign WGS 84, use ST_SetSRID(ST_H3ToPoint(cell), 4326).

Null input returns null. Invalid cell indexes raise an error.

Format: ST_H3ToPoint(cell: Long)

Return type: Geometry (Point)

Since: v2.0.0

SQL Example

SELECT ST_AsText(ST_H3ToPoint(617700169958293503))

Output (coordinates rounded):

POINT (-122.41845932318309 37.776702349435695)