适用于:
Databricks SQL
Databricks Runtime 17.1 及更高版本
Important
此功能目前以公共预览版提供。
注释
此功能在 Databricks SQL 经典仓库上不可用。 若要详细了解 Databricks SQL 仓库,请参阅 SQL 仓库类型。
返回一个 2D 笛卡尔 GEOMETRY 值,该值表示输入 GEOMETRY 值的 2D 轴对齐最小边界框(信封)。
如果输入几何图形为空,则按输入返回。
Syntax
st_envelope ( geoExpr )
Arguments
-
geoExpr:一个GEOMETRY值。
Returns
GEOMETRY 类型的值,表示输入几何图形的 2D 轴对齐最小边界框。
如果输入为 NULL.,则函数返回 NULL 。
Examples
-- Returns the envelope of a polygon geometry.
> SELECT st_astext(st_envelope(st_geomfromtext('POLYGON((-1 0,0 -1,1 0,0 1,-1 0))')));
POLYGON((-1 -1,-1 1,1 1,1 -1,-1 -1))
-- Returns the envelope of a point geometry.
> SELECT st_astext(st_envelope(st_geomfromtext('POINT(5 10)')));
POINT(5 10)