ST_AsEncodedPolyline

更新时间:
复制 MD 格式

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)