ST_AsEncodedPolyline

更新时间: 2026-03-28 16:30:07

Returns the encoded polyline that represents a LineString object.

Syntax

text ST_AsEncodedPolyline(geometry geom, integer precision)

Parameters

ParameterTypeDescription
geomgeometryThe LineString geometry to encode.
precisionintegerThe number of decimal places to retain in the encoded output. Default value: 5. The encoding and decoding precision must match; mismatched values produce incorrect coordinates.

Examples

SELECT ST_AsEncodedPolyline(GeomFromEWKT('SRID=4326;LINESTRING(120 36,130 40,126 43)'));

Output:

    st_asencodedpolyline
-----------------------------
 _gvzE_ol{U_glW_c`|@_}hQ~flW
(1 row)
上一篇: ST_AsBinary 下一篇: ST_AsEWKB
阿里云首页 云原生数据库 PolarDB 相关技术圈