适用于:
Databricks Runtime 18.0 及更高版本
重要
此功能目前以公共预览版提供。
注释
此功能在 Databricks SQL 经典仓库上不可用。 若要详细了解 Databricks SQL 仓库,请参阅 SQL 仓库类型。
解析扩展 Well-Known 文本(EWKT)描述的几何图形并返回对应的GEOGRAPHY值。 仅支持 SRID 4326。
Syntax
st_geogfromewkt ( ewktExpr )
Arguments
-
ewktExpr:一个STRING值,表示 采用扩展 WKT (EWKT) 格式的地理位置。
退货
GEOGRAPHY(ANY) 表示已解析的扩展 WKT(EWKT)几何图形的值。 返回 GEOGRAPHY 值的 SRID 为 4326。
如果任何输入为NULL,该函数将返回NULL。
错误条件
- 如果
ewktExpr的值是无效的 扩展 WKT (EWKT) 描述,则函数返回 EWKT_PARSE_ERROR。
例子
-- Simple example where the input geography is provided in EWKT format.
> SELECT concat_ws(';', st_srid(g)::STRING, st_astext(g)) FROM (SELECT st_geogfromewkt('SRID=4326;POINT Z (1 2 3)') AS g);
4326;POINT Z (1 2 3)
相关函数
-
st_asbinary函数 -
st_asewkb函数 -
st_asewkt函数 -
st_asgeojson函数 -
st_astext函数 -
st_geogfromgeojson函数 -
st_geogfromtext函数 -
st_geogfromwkb函数 -
st_geogfromwkt函数 -
st_geomfromewkb函数 -
st_geomfromewkt函数 -
st_geomfromgeojson函数 -
st_geomfromtext函数 -
st_geomfromwkb函数 -
st_geomfromwkt函数 -
to_geography函数 -
to_geometry函数 -
try_to_geography函数 -
try_to_geometry函数