linestring: linestring class

View source: R/linestring.R

linestringR Documentation

linestring class

Description

linestring class

Usage

linestring(x)

Arguments

x

input

Examples

x <- '{ "type": "LineString", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] }'
(y <- linestring(x))
geo_type(y)
geo_pretty(y)
geo_write(y, f <- tempfile(fileext = ".geojson"))
jsonlite::fromJSON(f, FALSE)
unlink(f)

# add to a data.frame
library('tibble')
tibble(a = 1:5, b = list(y))

ropenscilabs/geojson documentation built on Aug. 23, 2023, 7:51 p.m.