适用于: Databricks Runtime 17.1 及更高版本
重要
此功能目前以公共预览版提供。
以 WKT 格式返回输入 GEOGRAPHY
或 GEOMETRY
值。
语法
st_aswkt ( geoExpr )
论据
-
geoExpr
:GEOGRAPHY
或GEOMETRY
值。
退货
一个 STRING
类型的值。
返回的值是输入 GEOGRAPHY
或 GEOMETRY
值的 WKT 说明。
如果输入为 NULL
.,则函数返回 NULL
。
例子
-- Export a 3DZ Cartesian point, given in GeoJSON format, in WKT format.
> SELECT st_aswkt(to_geometry('{"type":"Point","coordinates":[2.718281828,3.141592653,100]}'))
POINT Z (2.718281828 3.141592653 100)
-- Export a 3DZ geographic point, given in GeoJSON format, in WKT format.
> SELECT st_aswkt(to_geography('{"type":"Point","coordinates":[2.718281828,3.141592653,100]}'))
POINT Z (2.718281828 3.141592653 100)
相关函数
-
st_asbinary
函数 -
st_asewkb
函数 -
st_asewkt
函数 -
st_asgeojson
函数 -
st_aswkb
函数 -
st_geogfromgeojson
函数 -
st_geogfromtext
函数 -
st_geogfromwkb
函数 -
st_geogfromwkt
函数 -
st_geomfromewkb
函数 -
st_geomfromgeojson
函数 -
st_geomfromtext
函数 -
st_geomfromwkb
函数 -
st_geomfromwkt
函数 -
to_geography
函数 -
to_geometry
函数 -
try_to_geography
函数 -
try_to_geometry
函数