Features_2Collection: creates a FeatureCollection dump from multiple Feature...

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

creates a FeatureCollection dump from multiple Feature geojson objects

Usage

1
2
3
4
5
6
Features_2Collection(
  Features_files_vec,
  bbox_vec = NULL,
  write_path = NULL,
  verbose = FALSE
)

Arguments

Features_files_vec

a character vector specifying paths to files (Feature geojson objects)

bbox_vec

either NULL or a numeric vector

write_path

either NULL or a character string specifying a valid path to a file ( preferably with a .geojson extension ) where the output data will be saved

verbose

a boolean. If TRUE then information will be printed out in the console

Details

The Features_2Collection function utilizes internally a for-loop. In case of an error set the verbose parameter to TRUE to find out which file leads to this error.

Value

a FeatureCollection dump

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

library(geojsonR)

vec_files = c("/myfolder/Feature1.geojson", "/myfolder/Feature2.geojson",
              "/myfolder/Feature3.geojson", "/myfolder/Feature4.geojson",
              "/myfolder/Feature5.geojson")

res = Features_2Collection(vec_files, bbox_vec = NULL)

## End(Not run)

geojsonR documentation built on May 4, 2021, 9:06 a.m.