Geometry

1D Geometry

For all geometries and locations we try to use a single Point class.

In 1D applications it’s only used to specify, for example height, other fields left None.

For profiles used in 1D applications, see ProfileLayer

class geolib.geometry.one.Point(**data)

A single Point Class.

Parameters:

data (Any)

id: Optional[int]
label: Optional[str]
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'validate_assignment': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

tolerance: float
x: float
y: float
z: float

2D Geometry

Two-dimensional geometry is handled differently by the two programs using this geometry, namely D-Settlement and D-Stability.

In our API we use the D-Settlement approach::
  • add_point(Point) -> point_id:int

  • add_layer(List[point_id]) -> layer_id:int

Where we use references to previously added points to ensure topological consistency. This is why we have not introduced a LineString object as of yet.

Note however that for D-Settlement this List of points should form a LineString (ordered in X), while for D-Stability they should form an ordered Ring (Polygon).