def __init__(self, depth: float, value: float, *args, **kwargs) -> None: """ Initialise the class """ self.depth = depth self.value = value AbstractDBObject.__init__(self, *args, **kwargs)
def __init__(self, depth: float, horizon: StratigraphicObject, *args, **kwargs) -> None: """ initialize the class """ AbstractDBObject.__init__(self, *args, **kwargs) self.depth = float(depth) self.horizon = horizon
def __init__(self, property_name: str, property_unit: str, *args, **kwargs) -> None: """ Initialises the class """ self.property_name = property_name self.property_unit = property_unit AbstractDBObject.__init__(self, *args, **kwargs)
def __init__(self, name: str, age: float = -1, *args, **kwargs) -> None: """ Initialize a stratigraphic unit """ AbstractDBObject.__init__(self, *args, **kwargs) try: age = int(age) except ValueError as e: raise ValueError("Cannot convert age to int:\n{}".format(str(e))) self.unit_name = str(name) self.age = -1 if (age < 0) else age
def __init__(self, reference_system: str, easting: float, northing: float, altitude: float, *args, **kwargs) -> None: """ Initialise the AbstractGeoObject """ self.reference_system = reference_system self.easting = easting self.northing = northing self.altitude = altitude # call constructor of base class AbstractDBObject.__init__(self, *args, **kwargs)
def __init__(self, closed: bool, horizon: StratigraphicObject, points: List[GeoPoint], *args, **kwargs) -> None: """ Create a new line. """ for pnt in points: if type(pnt) is not GeoPoint: raise ValueError("At least on point in points is not of type GeoPoint!") self.is_closed = bool(closed) self.horizon = horizon self.points = points # check doubled values and stratigraphy in the line self.__remove_doubled_points() self.__check_line() # call base class constructor AbstractDBObject.__init__(self, *args, **kwargs) if self.name_col == "": self.name_col = "line_{}".format(self.id)