export_shp: Write shapefiles

Description Usage Arguments Value Examples

View source: R/export_shp.R

Description

Write shapefiles

Usage

1
2
3
4
export_shp(obj, pathshp, FUN = rgdal::writeOGR, dsnlayerbind = F,
  data_source = flyio_get_datasource(),
  bucket = flyio_get_bucket(data_source), dir = flyio_get_dir(),
  delete_file = TRUE, show_progress = FALSE, ...)

Arguments

obj

R object to be written

pathshp

the path of the shapefile, which may or may not include the extension

FUN

the function using which the file is to be read

dsnlayerbind

if the FUN needs dsn and layer binded or not

data_source

the name of the data source, if not set globally. s3, gcs or local

bucket

the name of the bucket, if not set globally

dir

the directory to store intermediate files

delete_file

logical. to delete the file to be uploaded

show_progress

logical. Shows progress of the upload operation.

...

other parameters for the FUN function defined above

Value

output of the FUN function if any

Examples

1
2
3
4
5
6
7
## Not run: 
# Save shapefile on Google Cloud
flyio_set_datasource("gcs")
flyio_set_bucket("your-bucket-name")
export_shp(your-shp, "your-shp.shp", driver = "ESRI Shapefile", overwrite = T, dir = tempdir())

## End(Not run)

flyio documentation built on Oct. 31, 2019, 4:59 p.m.