st_write_feather: Write 'sf' object to Feather file

Description Usage Arguments Value See Also Examples

View source: R/st_arrow.R

Description

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.

Usage

1
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

write_feather

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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)

# In Python, read the new file with geopandas.read_feather(...)
# read back into R
nc_f <- st_read_feather(tf)

sfarrow documentation built on Oct. 27, 2021, 5:07 p.m.