Returns the encoded polyline that represents a LineString object.
Syntax
text ST_AsEncodedPolyline(geometry geom, integer precision)Parameters
| Parameter | Type | Description |
|---|---|---|
geom | geometry | The LineString geometry to encode. |
precision | integer | The 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)该文章对您有帮助吗?