powered by
Read raster data from anywhere using a function defined by you
import_raster(file, FUN = raster::raster, data_source = flyio_get_datasource(), bucket = flyio_get_bucket(data_source), dir = flyio_get_dir(), delete_file = FALSE, show_progress = FALSE, ...)
path of the file to be read
the function using which the file is to be read
the name of the data source, if not set globally. s3, gcs or local
the name of the bucket, if not set globally
the directory to store intermediate files
logical. to delete the file downloaded
logical. Shows progress of the download operation
other parameters for the FUN function defined above
the output of the FUN function
# NOT RUN { # when data source is cloud flyio_set_datasource("gcs") flyio_set_bucket("your-bucket-name") library(raster) t = import_raster("your-raster.tif", FUN = raster, dir = tempdir()) # }
Run the code above in your browser using DataLab