Convert a simple features spatial object from
write to a Parquet file using
sfc) are converted to well-known binary (WKB) format.
object of class
data source name. A path and file name with .parquet extension
additional options to pass to
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 = '.parquet') on.exit(unlink(tf)) # write out object st_write_parquet(obj = nc, dsn = tf) # In Python, read the new file with geopandas.read_parquet(...) # read back into R nc_p <- st_read_parquet(tf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.