Write sf object to an Arrow multi-file dataset
Usage
write_sf_dataset(
obj,
path,
format = "parquet",
partitioning = dplyr::group_vars(obj),
hf_version = "2.2",
license = "ODbL",
source = "lynker-spatial",
...
)Arguments
- obj
object of class
sf- path
string path referencing a directory for the output
- format
output file format ("parquet" or "feather")
- partitioning
character vector of columns in
objfor grouping or thedplyr::group_vars- hf_version
dataset version
- license
dataset license
- source
dataset source
- ...
additional arguments and options passed to
arrow::write_dataset
Details
Translate an sf spatial object to data.frame with WKB
geometry columns and then write to an arrow dataset with
partitioning. Allows for dplyr grouped datasets (using
group_by) and uses those variables to define
partitions. Adopted from wcjochem/sfarrow
