Koswat dike surroundings¶
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs)
Copyright (C) 2025 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
KoswatSurroundingsProtocol
¶
Bases: Protocol
Empty interface to represent the Koswat surroundings and easily identify them throughout the solution.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs)
Copyright (C) 2025 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
SurroundingsInfrastructure
dataclass
¶
Bases: KoswatSurroundingsProtocol
Defines surroundings point collections that can be repaired or replaced.
The PointSurroundings contain a matrix (dictionary) where the keys
represent the distances to an obstacle, and the values a float representing
how long that infrastructure is.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs)
Copyright (C) 2025 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
SurroundingsObstacle
dataclass
¶
Bases: KoswatSurroundingsProtocol
Defines surroundings point collections that cannot be repaired or replaced.
The PointObstacleSurroundings contain the closest distance to an obstacle
both inside and outside the polder.
Point¶
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs)
Copyright (C) 2025 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
PointSurroundings
dataclass
¶
Object representing a meter with x, y coordinates in a polder (or else).
__eq__(__value: object) -> bool
¶
Overriding of the "magic" equality operator required
so that PointSurroundings can be used as a key in a python dict.
__hash__() -> int
¶
Overriding of the "magic" hash operator required
so that PointSurroundings can be used as a key in a python dict.
get_total_infrastructure_per_zone(*zone_limit_collection: tuple[float, float]) -> list[float]
¶
Gets the total infrastructure width at each of the provided zones
zone_limit_collection (tuple[float, float]).
The zone limits are matched by rounding up their upper limit to the
surroundings_matrix keys (distances to the location in the real world).
When two zones have overlapping limits (as expected) the lower one will
"claim" the corresponding surrounding distance.
Example
zone_limit_collection= (0, 4), (4, 11)surroundings_matrix= {5: 1.5, 10: 3, 15: 6}- "Taken" distances per zone:
(0, 4)takes key5.(4, 11)takes key(s)10and15because5was already taken.
- Total infrastructure width at zones =
(1.5, 9)
| Returns: |
|
|---|
merge(other: PointSurroundings) -> None
¶
Merges another PointSurroundings into this one by updating the
surroundings_matrix with the values from the other one.
| Parameters: |
|
|---|
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs)
Copyright (C) 2025 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
PointSurroundingsListBuilder
dataclass
¶
Bases: BuilderProtocol
Builds a collection of points (list[PointSurroundings]) given the dike locations
(KoswatDikeLocationsShpFom) and the surroundings around it
(KoswatSurroundingsCsvFom).
Wrapper¶
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs)
Copyright (C) 2025 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
SurroundingsWrapper
dataclass
¶
get_locations_at_safe_distance(distance: float) -> list[PointSurroundings]
¶
Gets all locations which are safe from obstacle surroundings in a radius of distance.
| Parameters: |
|
|---|
| Returns: |
|
|---|
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs)
Copyright (C) 2025 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs)
Copyright (C) 2025 Stichting Deltares
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
ObstacleSurroundingsWrapper
dataclass
¶
Bases: BaseSurroundingsWrapper
get_locations_at_safe_distance(distance: float) -> list[PointSurroundings]
¶
Gets all locations which are safe from obstacle surroundings in a radius of distance.
| Parameters: |
|
|---|
| Returns: |
|
|---|
obstacle_locations: list[PointObstacleSurroundings]
property
¶
Overlay of locations of the different ObstacleSurroundings that are present.
Buildings need to be present as input (leading for location coordinates).
Each location represents 1 meter in a real scale map.
| Returns: |
|
|---|