polyline_wkt | R Documentation |
Converts encoded polylines into well-known text.
polyline_wkt(obj)
obj |
|
'Polylines' refers to lat/lon coordinates encoded into strings using Google's polyline encoding algorithm.
The function assumes Google Web Mercator projection (WSG 84 / EPSG:3857 / EPSG:900913) for inputs and outputs.
well-known text representation of the encoded polylines
This will not work if you have specified strip = TRUE
for encode()
## 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.