Convert a simple features spatial object from sf and write to a Feather file using write_feather. Geometry columns (type sfc) are converted to well-known binary (WKB) format.

st_write_feather(obj, dsn, ...)

Arguments

obj

object of class sf

dsn

data source name. A path and file name with .parquet extension

...

additional options to pass to write_feather

Value

obj invisibly

See also

Examples

# read spatial object nc <- sf::st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE) # create temp file tf <- tempfile(fileext = '.feather') on.exit(unlink(tf)) # write out object st_write_feather(obj = nc, dsn = tf)
#> Warning: This is an initial implementation of Parquet/Feather file support and #> geo metadata. This is tracking version 0.1.0 of the metadata #> (https://github.com/geopandas/geo-arrow-spec). This metadata #> specification may change and does not yet make stability promises. We #> do not yet recommend using this in a production setting unless you are #> able to rewrite your Parquet/Feather files.
# In Python, read the new file with geopandas.read_feather(...) # read back into R nc_f <- st_read_feather(tf)