Skip to content

Commit

Permalink
added option for absolute or relative damages (#385)
Browse files Browse the repository at this point in the history
* added option for absolute or relative damages

* changes optional variables in site.toml
  • Loading branch information
panosatha authored Mar 13, 2024
1 parent c87d8b7 commit d28e09a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion flood_adapt/object_model/interface/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,24 @@ class SlrModel(BaseModel):
relative_to_year: int


class DamageType(str, Enum):
"""class describing the accepted input for the variable footprints_dmg_type"""

absolute = "absolute"
relative = "relative"


class MapboxLayersModel(BaseModel):
"""class describing the configuration of the mapbox layers in the gui"""

buildings_min_zoom_level: int = 13
flood_map_depth_min: float
flood_map_zbmax: float
flood_map_bins: list[float]
flood_map_colors: list[str]
aggregation_dmg_bins: list[float]
aggregation_dmg_colors: list[str]
footprints_dmg_type: DamageType = "absolute"
footprints_dmg_bins: list[float]
footprints_dmg_colors: list[str]
svi_bins: Optional[list[float]] = []
Expand All @@ -91,7 +100,6 @@ class MapboxLayersModel(BaseModel):
class VisualizationLayersModel(BaseModel):
"""class describing the configuration of the layers you might want to visualize in the gui"""

buildings_min_zoom_level: Optional[int] = 13
default_bin_number: int
default_colors: list[str]
layer_names: list[str]
Expand Down

0 comments on commit d28e09a

Please sign in to comment.