wellknown-package: WKT to GeoJSON and vice versa

Description Author(s) Examples

Description

WKT to GeoJSON and vice versa

Author(s)

Scott Chamberlain [email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# GeoJSON to WKT
point <- list(Point = c(116.4, 45.2, 11.1))
geojson2wkt(point)

# WKT to GeoJSON
str <- "POINT (-116.4000000000000057 45.2000000000000028)"
wkt2geojson(str)

## lint WKT
lint("POINT (1 2)")
lint("POINT (1 2 3 4 5)")

# WKT <--> WKB
wkt_wkb("POINT (-116.4 45.2)")
wkb_wkt(wkt_wkb("POINT (-116.4 45.2)"))

ropensci/wellknown documentation built on June 17, 2018, 3:51 p.m.