Skip to contents

Read the GeoParquet file into R. GeoParquet should also work in any programming language that supports arrow. Newer version of GDAL with Parquet driver is not strictly necessary if the geometry's WKB can be converted to whichever language specific object such as sfc in R.

Usage

readSF(path, metadata = NULL)

Arguments

path

String containing a path to a directory, itself created with a saveObject method.

metadata

Named list containing metadata for the object - most importantly, the type field that controls dispatch to the correct loading function. If NULL, this is automatically read by readObjectFile(path).

Value

An sf data frame

Examples

library(sf)
#> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE
fp <- tempfile()
df <- as.data.frame(matrix(rnorm(10), ncol = 2))
df <- st_as_sf(df, coords = names(df), crs = NA)
saveObject(df, path = fp)
df2 <- readObject(fp)