File: exceptions.py

package info (click to toggle)
python-rioxarray 0.19.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,304 kB
  • sloc: python: 7,893; makefile: 93
file content (43 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download | duplicates (3)
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
40
41
42
43
"""
This contains exceptions for rioxarray.
"""


class RioXarrayError(RuntimeError):
    """This is the base exception for errors in the rioxarray extension."""


class NoDataInBounds(RioXarrayError):
    """This is for when there are no data in the bounds for clipping a raster."""


class SingleVariableDataset(RioXarrayError):
    """This is for when you have a dataset with a single variable."""


class DimensionError(RioXarrayError):
    """This is raised when there are more dimensions than is supported by the method"""


class MissingSpatialDimensionError(DimensionError):
    """This is raised when the dimension cannot be found"""


class TooManyDimensions(DimensionError):
    """This is raised when there are more dimensions than is supported by the method"""


class InvalidDimensionOrder(DimensionError):
    """This is raised when there the dimensions are not ordered correctly."""


class OneDimensionalRaster(DimensionError):
    """This is an error when you have a 1 dimensional raster."""


class DimensionMissingCoordinateError(RioXarrayError):
    """This is raised when the dimension does not have the supporting coordinate."""


class MissingCRS(RioXarrayError):
    """Missing the CRS in the dataset."""