Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
返回表示指定几何的二进制字符串。输出格式是由 OGC SFS 1.1 定义的 WKB。此格式不包含 Z 和 M 值。
ST_AsBinary(geometry-expression)
BINARY 返回 geometry-expression 的 WKB 表示。
以下语句返回结果 0x0101000000000000000000f03f0000000000000040:
0x0101000000000000000000f03f0000000000000040
SELECT ST_AsBinary(ST_Point(1.0, 2.0, 4326))
将几何转换为 BINARY 时,服务器隐式调用 ST_AsBinary 函数。例如,以下语句返回结果 0x0101000000000000000000f03f0000000000000040:
SELECT CAST(ST_Point(1.0, 2.0, 4326) AS BINARY(50))