lawn_flatten: Flatten

View source: R/flatten.R

lawn_flattenR Documentation

Flatten

Description

Flattens any GeoJSON to a FeatureCollection

Usage

lawn_flatten(x, lint = FALSE)

Arguments

x

any valid GeoJSON with multi-geometry data-Feature's

lint

(logical) Lint or not. Uses geojsonhint. Takes up increasing time as the object to get linted increases in size, so probably use by default for small objects, but not for large if you know they are good geojson objects. Default: FALSE

Value

a data-FeatureCollection

See Also

Other misc: lawn_truncate()

Examples

x <- '{"type":"MultiPolygon","coordinates":[
  [[[102,2],[103,2],[103,3],[102,3],[102,2]]],
  [[[100,0],[101,0],[101,1],[100,1],[100,0]],
  [[100.2,0.2],[100.2,0.8],[100.8,0.8],[100.8,0.2],[100.2,0.2]]]
 ]
}'
lawn_flatten(x)
lawn_flatten(x, TRUE)

ropensci/lawn documentation built on May 18, 2022, 9:58 a.m.