wkt_polyline: WKT Polyline

View source: R/wkt.R

wkt_polylineR Documentation

WKT Polyline

Description

Converts well-known text into encoded polylines.

Usage

wkt_polyline(obj)

Arguments

obj

sfencoded object or wkt_column of well-known text

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)


googlePolylines documentation built on Oct. 30, 2024, 9:29 a.m.