rasterio.shutil module

Raster file management.

rasterio.shutil.copy(src, dst, driver=None, strict=True, **creation_options)

Copy a raster from a path or open dataset handle to a new destination with driver specific creation options.

Parameters:
  • src (str or PathLike or dataset object opened in 'r' mode) – Source dataset

  • dst (str or PathLike) – Output dataset path

  • driver (str, optional) – Output driver name

  • strict (bool, optional. Default: True) – Indicates if the output must be strictly equivalent or if the driver may adapt as necessary

  • creation_options (dict, optional) – Creation options for output dataset

Return type:

None

rasterio.shutil.copyfiles(src, dst)

Copy files associated with a dataset from one location to another.

Parameters:
  • src (str or PathLike) – Source dataset

  • dst (str or PathLike) – Target dataset

Return type:

None

rasterio.shutil.delete(path, driver=None)

Delete a GDAL dataset

Parameters:
  • path (path) – Path to dataset to delete

  • driver (str or None, optional) – Name of driver to use for deleting. Defaults to whatever GDAL determines is the appropriate driver

rasterio.shutil.exists(path)

Determine if a dataset exists by attempting to open it.

Parameters:

path (str) – Path to dataset