Save spatial data.frame as shapefile.zip
Arguments
- shp
a spatial data.frame as from
shapefile_from_any()
orsf::st_read()
- file
full path to and name of the .zip file to create
Examples
# shp <- shapes_from_fips(fips = name2fips(c('tucson,az', 'tempe, AZ')))
shp <- testshapes_2
if (FALSE) { # \dontrun{
fname <- file.path(tempdir(), "myfile.zip")
fpath <- shape2zip(shp, fname)
file.exists(fpath)
zip::zip_list(fpath)
# read it back in
shp2 <- shapefile_from_any(fpath)
} # }