/usr/lib/python3/dist-packages/rasterio/errors.py is in python3-rasterio 0.36.0-2build5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | """Errors and Warnings."""
from click import FileError
class CRSError(ValueError):
"""Raised when a CRS string or mapping is invalid or cannot serve
to define a coordinate transformation."""
class EnvError(Exception):
"""Raised when the state of GDAL/AWS environment cannot be created
or modified."""
class DriverRegistrationError(ValueError):
"""Raised when a format driver is requested but is not registered."""
class FileOverwriteError(FileError):
"""Raised when Rasterio's CLI refuses to clobber output files."""
def __init__(self, message):
"""Raise FileOverwriteError with message as hint."""
super(FileOverwriteError, self).__init__('', hint=message)
class RasterioIOError(IOError):
"""Raised when a dataset cannot be opened using one of the
registered format drivers."""
class NodataShadowWarning(Warning):
"""Warn that a dataset's nodata attribute is shadowing its alpha band."""
def __str__(self):
return ("The dataset's nodata attribute is shadowing "
"the alpha band. All masks will be determined "
"by the nodata attribute")
|