point: point class

View source: R/point.R

pointR Documentation

point class

Description

point class

Usage

point(x)

Arguments

x

input

Examples

x <- '{ "type": "Point", "coordinates": [100.0, 0.0] }'
(y <- point(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))

# as.geojson coercion
as.geojson(x)

ropensci/geojson documentation built on Aug. 23, 2023, 10:30 a.m.