wkt_polyline {googlePolylines} | R Documentation |
WKT Polyline
Description
Converts well-known text into encoded polylines.
Usage
wkt_polyline(obj)
Arguments
obj |
|
Details
'Polylines' refers to lat/lon coordinates encoded into strings using Google's polyline encoding algorithm.
Value
encoded polyline representation of geometries
Examples
## Not run:
library(sf)
nc <- sf::st_read(system.file("shape/nc.shp", package="sf"))
## encode to polylines
enc <- encode(nc)
## convert encoded lines to well-known text
wkt <- polyline_wkt(enc)
## convert well-known text back to polylines
enc2 <- wkt_polyline(wkt)
## End(Not run)
[Package googlePolylines version 0.8.4 Index]