wkt_polyline | R Documentation |
Converts well-known text into encoded polylines.
wkt_polyline(obj)
obj |
|
'Polylines' refers to lat/lon coordinates encoded into strings using Google's polyline encoding algorithm.
encoded polyline representation of geometries
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.