"""
This contains exceptions for rioxarray.
"""
[docs]class RioXarrayError(RuntimeError):
"""This is the base exception for errors in the rioxarray extension."""
[docs]class NoDataInBounds(RioXarrayError):
"""This is for when there are no data in the bounds for clipping a raster."""
[docs]class SingleVariableDataset(RioXarrayError):
"""This is for when you have a dataset with a single variable."""
[docs]class DimensionError(RioXarrayError):
"""This is raised when there are more dimensions than is supported by the method"""
[docs]class MissingSpatialDimensionError(DimensionError):
"""This is raised when the dimension cannot be found"""
[docs]class TooManyDimensions(DimensionError):
"""This is raised when there are more dimensions than is supported by the method"""
[docs]class InvalidDimensionOrder(DimensionError):
"""This is raised when there the dimensions are not ordered correctly."""
[docs]class OneDimensionalRaster(DimensionError):
"""This is an error when you have a 1 dimensional raster."""
[docs]class DimensionMissingCoordinateError(RioXarrayError):
"""This is raised when the dimension does not have the supporting coordinate."""
[docs]class MissingCRS(RioXarrayError):
"""Missing the CRS in the dataset."""