Source code for geodetic_engine.welltrajectory.errors

"""Exceptions raised while computing a well trajectory.

CRS and coordinate operation failures keep the types
:mod:`geodetic_engine.geodesy` raises for them; these cover the survey itself.
"""

from geodetic_engine import units
from geodetic_engine.errors import GeodeticEngineError


[docs] class WellTrajectoryError(GeodeticEngineError): """Base class for all well trajectory failures."""
[docs] class InvalidSurveyError(WellTrajectoryError): """The survey cannot describe a wellbore as given. Too few stations, a measured depth that does not strictly increase, an angle out of range, or a depth asked for outside the surveyed interval. """
[docs] class DegenerateSurveyError(InvalidSurveyError): """Two stations point in opposite directions, leaving the arc plane undefined."""
[docs] class InvalidInputError(WellTrajectoryError): """A trajectory input is incomplete or malformed. A required setting is missing, a setting has a value it cannot take, a survey file does not follow the format, or a payload lacks a field. """
[docs] class UnitError(units.UnitError, WellTrajectoryError): """A unit was not recognised, or is not a unit of the quantity needed. The :class:`~geodetic_engine.units.UnitError` of a well trajectory input, so a :class:`WellTrajectoryError` too. Never resolved to a default: a length read in the wrong unit moves every position by a plausible looking amount. """