itacart.exceptions

Exception hierarchy for the itacart package.

Provenance: adapted from itacart_core/exceptions.py.

Every error raised by the package derives from ITACaRTError, so a caller can guard an entire pipeline with one except and never catch a bare ValueError that leaked from somewhere else:

ITACaRTError
|
+-- InvalidIndexError            index string is malformed
|     +-- InvalidQuadrantError
|     +-- InvalidRefinementCodeError
+-- NonAtomicIndexError          several cells where one was required
+-- ResolutionError              resolution out of range or inapplicable
|     +-- MaxResolutionError
|     +-- MinResolutionError
+-- DomainError                  position or cell outside the domain
|     +-- NonExistentCellError
|     +-- AntemeridianError
+-- GeometryError                input geometry invalid or unsupported
|     +-- UnsupportedGeometryTypeError
|     +-- DensificationError
+-- ConvergenceError             iterative geodesic did not converge
+-- SerializationError           binary encoding or decoding failed
      +-- MalformedBlobError
      +-- IncompatibleProfileError

Three names are load-bearing, because callers and tests catch them by name: ConvergenceError from the geodesic solvers, InvalidRefinementCodeError from the index parser and AntemeridianError from the fill. Renaming any of them breaks those callers by name, not by logic.

Exceptions

AntemeridianError

Geometry crosses the antemeridian outside a defined extension zone.

ConvergenceError

An iterative geodesic computation failed to converge (Vincenty).

DensificationError

Densification could not be carried out for the given segment.

DomainError

Coordinates or cell fall outside the addressable ITACaRT domain.

GeometryError

Input geometry is invalid or unsupported.

ITACaRTError

Base class for every error raised by this package.

IncompatibleProfileError

Blob declares a profile combination this build cannot honour.

InvalidIndexError

The compositional index string is syntactically malformed.

InvalidQuadrantError

Quadrant code is not one of NE, NW, SE, SW.

InvalidRefinementCodeError

A refinement code does not belong to the alphabet of its resolution.

MalformedBlobError

Binary blob failed structural validation.

MaxResolutionError

Attempt to refine beyond resolution 13.

MinResolutionError

Attempt to ascend above resolution 0.

NonAtomicIndexError

Operation requires a single terminal cell but the index holds several.

NonExistentCellError

Cell is structurally non-existent under the specification.

ResolutionError

Resolution is outside the valid range or invalid for the operation.

SerializationError

Base class for binary encoding and decoding failures.

UnsupportedGeometryTypeError

Geometry type is not one of the supported OGC SFA types.