Reinforcement Layers Wrapper

KoswatLayerProtocol

Bases: Protocol

as_data_dict() -> dict

Returns the information related to an instance of the KoswatLayerProtocol.

Returns:

Name Type Description
dict dict

custom dictionary with the relevant data.

get_polygon_coordinates(pol_geometry: geometry.Polygon | geometry.MultiPolygon) -> geometry.LineString

Given a single or multi geometry returns the coordinates composing its outer layout.

Parameters:

Name Type Description Default
pol_geometry geometry.Polygon | geometry.MultiPolygon

Source geometry.

required

Raises:

Type Description
NotImplementedError

When the provided geometry is not yet supported.

Returns:

Type Description
geometry.LineString

geometry.LineString: Set of points composing the outer layout of the geometry.

ReinforcementCoatingLayer

Bases: ReinforcementLayerProtocol

with_same_outer_geometry(coating_layer: KoswatCoatingLayer) -> ReinforcementCoatingLayer classmethod

Creates a new reinforcement coating layer which does not differ in geometry from the provided coating layer. This was found to be needed in KOSWAT_82.

Parameters:

Name Type Description Default
coating_layer KoswatCoatingLayer

Base coating layer.

required

Returns:

Name Type Description
ReinforcementCoatingLayer ReinforcementCoatingLayer

Resulting coating layer with "empty"

ReinforcementCoatingLayer

polygons for added / removed (layer) geometries.

get_polygon_coordinates(pol_geometry: geometry.Polygon | geometry.MultiPolygon) -> geometry.LineString

Given a single or multi geometry returns the coordinates composing its outer layout.

Parameters:

Name Type Description Default
pol_geometry geometry.Polygon | geometry.MultiPolygon

Source geometry.

required

Raises:

Type Description
NotImplementedError

When the provided geometry is not yet supported.

Returns:

Type Description
geometry.LineString

geometry.LineString: Set of points composing the outer layout of the geometry.

KoswatLayersWrapperProtocol

Bases: Protocol

as_data_dict() -> dict

Returns the layers as a dictionary.

Returns:

Name Type Description
dict dict

Dictionary containing all the information of the wrapper layers (KoswatLayerProtocol).

ReinforcementCoatingLayer

Bases: ReinforcementLayerProtocol

with_same_outer_geometry(coating_layer: KoswatCoatingLayer) -> ReinforcementCoatingLayer classmethod

Creates a new reinforcement coating layer which does not differ in geometry from the provided coating layer. This was found to be needed in KOSWAT_82.

Parameters:

Name Type Description Default
coating_layer KoswatCoatingLayer

Base coating layer.

required

Returns:

Name Type Description
ReinforcementCoatingLayer ReinforcementCoatingLayer

Resulting coating layer with "empty"

ReinforcementCoatingLayer

polygons for added / removed (layer) geometries.

ReinforcementLayersWrapper

Bases: KoswatLayersWrapperProtocol

layers: list[ReinforcementLayerProtocol] property

All the stored layers being the KoswatBaseLayer the latest one in the collection.

Returns:

Type Description
list[ReinforcementLayerProtocol]

List[KoswatLayerProtocol]: Ordered list of KoswatLayerProtocol.

KoswatLayerProtocol

Bases: Protocol

as_data_dict() -> dict

Returns the information related to an instance of the KoswatLayerProtocol.

Returns:

Name Type Description
dict dict

custom dictionary with the relevant data.

KoswatLayersWrapperBuilderProtocol

Bases: BuilderProtocol, Protocol

build() -> KoswatLayersWrapperProtocol

Builds an instance of KoswatLayersWrapperProtocol based on the class required fields layers_data and profile_points.

Returns:

Name Type Description
KoswatLayersWrapperProtocol KoswatLayersWrapperProtocol

Valid initialized instance of a KoswatLayersWrapperProtocol.

KoswatLayersWrapperProtocol

Bases: Protocol

as_data_dict() -> dict

Returns the layers as a dictionary.

Returns:

Name Type Description
dict dict

Dictionary containing all the information of the wrapper layers (KoswatLayerProtocol).

OutsideSlopeReinforcementLayersWrapperBuilder

ReinforcementCoatingLayer

Bases: ReinforcementLayerProtocol

with_same_outer_geometry(coating_layer: KoswatCoatingLayer) -> ReinforcementCoatingLayer classmethod

Creates a new reinforcement coating layer which does not differ in geometry from the provided coating layer. This was found to be needed in KOSWAT_82.

Parameters:

Name Type Description Default
coating_layer KoswatCoatingLayer

Base coating layer.

required

Returns:

Name Type Description
ReinforcementCoatingLayer ReinforcementCoatingLayer

Resulting coating layer with "empty"

ReinforcementCoatingLayer

polygons for added / removed (layer) geometries.

ReinforcementLayersWrapper

Bases: KoswatLayersWrapperProtocol

layers: list[ReinforcementLayerProtocol] property

All the stored layers being the KoswatBaseLayer the latest one in the collection.

Returns:

Type Description
list[ReinforcementLayerProtocol]

List[KoswatLayerProtocol]: Ordered list of KoswatLayerProtocol.

get_polygon_surface_points(base_geometry: geometry.Polygon | geometry.MultiPolygon) -> geometry.LineString

Gets all the points composing the upper surface of a 'dike' geometry. IMPORTANT! The calling of this method assumes the base_geometry points are in order, call order_geometry_points if needed.

Parameters:

Name Type Description Default
base_geometry Union[geometry.Polygon, geometry.MultiPolygon]

Source geometry.

required

Returns:

Type Description
geometry.LineString

geometry.LineString: Resulting line with points from the outer geometry.

KoswatLayerProtocol

Bases: Protocol

as_data_dict() -> dict

Returns the information related to an instance of the KoswatLayerProtocol.

Returns:

Name Type Description
dict dict

custom dictionary with the relevant data.

KoswatLayersWrapperBuilderProtocol

Bases: BuilderProtocol, Protocol

build() -> KoswatLayersWrapperProtocol

Builds an instance of KoswatLayersWrapperProtocol based on the class required fields layers_data and profile_points.

Returns:

Name Type Description
KoswatLayersWrapperProtocol KoswatLayersWrapperProtocol

Valid initialized instance of a KoswatLayersWrapperProtocol.

KoswatLayersWrapperProtocol

Bases: Protocol

as_data_dict() -> dict

Returns the layers as a dictionary.

Returns:

Name Type Description
dict dict

Dictionary containing all the information of the wrapper layers (KoswatLayerProtocol).

ReinforcementCoatingLayer

Bases: ReinforcementLayerProtocol

with_same_outer_geometry(coating_layer: KoswatCoatingLayer) -> ReinforcementCoatingLayer classmethod

Creates a new reinforcement coating layer which does not differ in geometry from the provided coating layer. This was found to be needed in KOSWAT_82.

Parameters:

Name Type Description Default
coating_layer KoswatCoatingLayer

Base coating layer.

required

Returns:

Name Type Description
ReinforcementCoatingLayer ReinforcementCoatingLayer

Resulting coating layer with "empty"

ReinforcementCoatingLayer

polygons for added / removed (layer) geometries.

ReinforcementLayersWrapper

Bases: KoswatLayersWrapperProtocol

layers: list[ReinforcementLayerProtocol] property

All the stored layers being the KoswatBaseLayer the latest one in the collection.

Returns:

Type Description
list[ReinforcementLayerProtocol]

List[KoswatLayerProtocol]: Ordered list of KoswatLayerProtocol.

StandardReinforcementLayersWrapperBuilder

as_unified_geometry(source_geom: geometry.Polygon | geometry.MultiPolygon) -> geometry.Polygon

Ensures the calculated geometry is returned as a single polygon.

Parameters:

Name Type Description Default
source_geom geometry.Polygon | geometry.MultiPolygon

Calculated source geometry.

required

Returns:

Type Description
geometry.Polygon

geometry.Polygon: Unified resulting geometry with its points ordered (first one is the most-left x coordinate).

get_normalized_polygon_difference(left_geom: geometry.Polygon, right_geom: geometry.Polygon) -> geometry.Polygon | geometry.MultiPolygon

Given two polygons calculates the difference between them and removes any residual polygon due to minor precision errors.

Parameters:

Name Type Description Default
left_geom geometry.Polygon

Base polygon from where to substract.

required
right_geom geometry.Polygon

Polygon to substract from base.

required

Returns:

Type Description
geometry.Polygon | geometry.MultiPolygon

geometry.Polygon: Resulting normalized substraction polygon.

get_polygon_surface_points(base_geometry: geometry.Polygon | geometry.MultiPolygon) -> geometry.LineString

Gets all the points composing the upper surface of a 'dike' geometry. IMPORTANT! The calling of this method assumes the base_geometry points are in order, call order_geometry_points if needed.

Parameters:

Name Type Description Default
base_geometry Union[geometry.Polygon, geometry.MultiPolygon]

Source geometry.

required

Returns:

Type Description
geometry.LineString

geometry.LineString: Resulting line with points from the outer geometry.

get_relative_core_layer(core_geometry: geometry.Polygon, coating_geometry: geometry.Polygon) -> geometry.Polygon

Returns a new 'core' from the original core_geometry relative to the coating_geometry.

Parameters:

Name Type Description Default
core_geometry Polygon

Original core geometry on which layers are stacked upon.

required
coating_geometry Polygon

Layer wrapping the exterior of a core geometry.

required

Returns:

Name Type Description
Polygon geometry.Polygon

Layer wrapping a reduced surface of the core_geometry.