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

ST_Envelope

Introduction: Return the bounding box (envelope) of a geography. When splitAtAntiMeridian is true, an envelope crossing the antimeridian is split into a MultiPolygon.

Format:

ST_Envelope (geog: Geography, splitAtAntiMeridian: Boolean)

Return type: Geography

Since: v1.9.1

SQL Example:

SELECT ST_Envelope(ST_GeogFromWKT('LINESTRING (1 1, 2 3)', 4326), false)

Output:

POLYGON ((1 1, 2 1, 2 3, 1 3, 1 1))