Core geometries module¶
as_unified_geometry(source_geom: geometry.Polygon | geometry.MultiPolygon) -> geometry.Polygon
¶
Ensures the calculated geometry is returned as a single polygon.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_groundlevel_surface(pol_geometry: geometry.Polygon) -> geometry.LineString
¶
Returns all the points which are at 'groundlevel' values (y = 0)
| Parameters: |
|
|---|
| Returns: |
|
|---|
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: |
|
|---|
| Returns: |
|
|---|
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: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
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: |
|
|---|
| Returns: |
|
|---|
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: |
|
|---|
| Returns: |
|
|---|
order_geometry_points(dike_polygon: geometry.Polygon) -> geometry.Polygon
¶
In koswat we handle polygon operations expecting the lowest 'x' coordinate to be the initial and last point of a geometry. For this reason we need to ensure all geometries are 'normalized' based on this criteria.
| Parameters: |
|
|---|
| Returns: |
|
|---|
profile_points_to_polygon(points_list: list[geometry.Point]) -> geometry.Polygon
¶
Transforms a list of points into a valid 'dike' polygon. When there is a difference in height between left and right side then we correct it in the x = 0 coordinate.
| Parameters: |
|
|---|
| Returns: |
|
|---|
remove_layer_from_polygon(dike_polygon: geometry.Polygon, layer_depth: float) -> geometry.Polygon
¶
Gets the dike profile without a layer of provided layer_depth depth.
| Parameters: |
|
|---|
| Returns: |
|
|---|