适用于: Databricks Runtime 17.1 及更高版本
重要
此功能目前以公共预览版提供。
如果提供,使用指定的字节序返回采用扩展 WKB (EWKB) 格式的输入 GEOMETRY
值。
如果未指定 endianness,则返回的值是小端编码的。
语法
st_asewkb ( geoExpr[, endiannessExpr] )
论据
-
geoExpr
:一个GEOMETRY
值。 -
endiannessExpr
:一个可选的STRING
值,表示输出 WKB 的字节序,'NDR'
为小端(默认)或'XDR'
为大端。
退货
一个 BINARY
类型的值。
返回的值是输入 GEOMETRY
值的扩展 WKB(EWKB)描述,使用指定的字节序(如果提供)。
如果未指定 endianness,则返回的值是小端编码的。
如果任何输入为NULL
,该函数将返回NULL
。
例子
-- Export a 3DZ Cartesian point with SRID 4326 in EWKB format (default endianness).
> SELECT hex(st_asewkt(st_geomfromtext('POINT Z (1 2 100)', 4326)))
01010000A0E6100000000000000000F03F00000000000000400000000000005940
-- Export a 3DZ Cartesian point with SRID 4326 in big-endianness EWKB format.
> SELECT hex(st_asewkt(st_geomfromtext('POINT Z (1 2 100)', 4326), 'XDR'))
00A0000001000010E63FF000000000000040000000000000004059000000000000
相关函数
-
st_asbinary
函数 -
st_asgeojson
函数 -
st_asewkt
函数 -
st_aswkb
函数 -
st_aswkt
函数 -
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
函数