rasterio.errors module

Errors and Warnings.

exception rasterio.errors.BandOverviewError

Bases: UserWarning

Raised when a band overview access fails.

exception rasterio.errors.CRSError

Bases: ValueError

Raised when a CRS string or mapping is invalid or cannot serve to define a coordinate transformation.

exception rasterio.errors.DatasetAttributeError

Bases: rasterio.errors.RasterioError, NotImplementedError

Raised when dataset attributes are misused

exception rasterio.errors.DriverCapabilityError

Bases: rasterio.errors.RasterioError, ValueError

Raised when a format driver can’t a feature such as writing.

exception rasterio.errors.DriverRegistrationError

Bases: ValueError

Raised when a format driver is requested but is not registered.

exception rasterio.errors.EnvError

Bases: rasterio.errors.RasterioError

Raised when the state of GDAL/AWS environment cannot be created or modified.

exception rasterio.errors.FileOverwriteError(message)

Bases: click.exceptions.FileError

Raised when Rasterio’s CLI refuses to clobber output files.

exception rasterio.errors.GDALBehaviorChangeException

Bases: RuntimeError

Raised when GDAL’s behavior differs from the given arguments. For example, antimeridian cutting is always on as of GDAL 2.2.0. Users expecting it to be off will be presented with a MultiPolygon when the rest of their code expects a Polygon.

# Raises an exception on GDAL >= 2.2.0 rasterio.warp.transform_geometry(

src_crs, dst_crs, antimeridian_cutting=False)

exception rasterio.errors.GDALOptionNotImplementedError

Bases: rasterio.errors.RasterioError

A dataset opening or dataset creation option can’t be supported

This will be raised from Rasterio’s shim modules. For example, when a user passes arguments to open_dataset() that can’t be evaluated by GDAL 1.x.

exception rasterio.errors.GDALVersionError

Bases: rasterio.errors.RasterioError

Raised if the runtime version of GDAL does not meet the required version of GDAL.

exception rasterio.errors.NodataShadowWarning

Bases: UserWarning

Warn that a dataset’s nodata attribute is shadowing its alpha band.

exception rasterio.errors.NotGeoreferencedWarning

Bases: UserWarning

Warn that a dataset isn’t georeferenced.

exception rasterio.errors.OverviewCreationError

Bases: rasterio.errors.RasterioError

Raised when creation of an overview fails

exception rasterio.errors.PathError

Bases: rasterio.errors.RasterioError

Raised when a dataset path is malformed or invalid

exception rasterio.errors.RasterBlockError

Bases: rasterio.errors.RasterioError

Raised when raster block access fails

exception rasterio.errors.RasterioDeprecationWarning

Bases: UserWarning

Rasterio module deprecations

exception rasterio.errors.RasterioError

Bases: Exception

Root exception class

exception rasterio.errors.RasterioIOError

Bases: OSError

Raised when a dataset cannot be opened using one of the registered format drivers.

exception rasterio.errors.ResamplingAlgorithmError

Bases: rasterio.errors.RasterioError

Raised when a resampling algorithm is invalid or inapplicable

exception rasterio.errors.ShapeSkipWarning

Bases: UserWarning

Warn that an invalid or empty shape in a collection has been skipped

exception rasterio.errors.UnsupportedOperation

Bases: rasterio.errors.RasterioError

Raised when reading from a file opened in ‘w’ mode

exception rasterio.errors.WarpOptionsError

Bases: rasterio.errors.RasterioError

Raised when options for a warp operation are invalid

exception rasterio.errors.WindowError

Bases: rasterio.errors.RasterioError

Raised when errors occur during window operations

exception rasterio.errors.WindowEvaluationError

Bases: ValueError

Raised when window evaluation fails