Source code for geodetic_engine.projdb.errors
"""Exceptions raised while building a custom PROJ database.
Every failure mode that can produce a wrong coordinate downstream gets its own
type, so a caller can tell "this grid is missing" apart from "this operation is
ballpark only" apart from "PROJ changed its schema under us".
Failures that originate in the Georepository API are raised as
:class:`~geodetic_engine.georepository.errors.GeorepositoryError` instead. Both
hierarchies share :class:`~geodetic_engine.errors.GeodeticEngineError`.
"""
from geodetic_engine.errors import GeodeticEngineError
[docs]
class ProjDbBuildError(GeodeticEngineError):
"""Base class for all custom proj.db build failures."""
[docs]
class ConfigurationError(ProjDbBuildError):
"""The build configuration is missing or inconsistent."""
[docs]
class SchemaDriftError(ProjDbBuildError):
"""The base proj.db does not have the columns this builder expects."""
[docs]
class ForeignAuthorityCollision(ProjDbBuildError):
"""A row would overwrite an object belonging to another authority."""
[docs]
class OutputWouldBeDiscarded(ProjDbBuildError):
"""A fresh build would drop authorities an existing output database holds."""
[docs]
class MissingReferencedObjectError(ProjDbBuildError):
"""A custom object references an object that is not in the database."""
[docs]
class MissingGridError(ProjDbBuildError):
"""A grid-based transformation references a grid file that is not available."""
[docs]
class BallparkOnlyOperationError(ProjDbBuildError):
"""A non-deprecated object only resolves through a ballpark transformation."""
[docs]
class UnsupportedMethodError(ProjDbBuildError):
"""A coordinate operation method is not evaluable by this PROJ build."""