ConfigModel

database_builder.ConfigModel()

Represents the configuration model for FloodAdapt.

Attributes

name : str

The name of the site.

description : Optional[str], default None

The description of the site.

database_path : Optional[str], default None

The path to the database where all the sites are located.

unit_system : UnitSystems

The unit system.

gui : GuiConfigModel

The GUI model representing scaling values for the layers.

infographics : Optional[bool], default True

Indicates if infographics are enabled.

fiat : str

The FIAT model path.

aggregation_areas : Optional[list[SpatialJoinModel]], default None

The list of aggregation area models.

building_footprints : Optional[SpatialJoinModel | FootprintsOptions], default FootprintsOptions.OSM

The building footprints model or OSM option.

fiat_buildings_name : str | list[str], default "buildings"

The name(s) of the buildings geometry in the FIAT model.

fiat_roads_name : Optional[str], default "roads"

The name of the roads geometry in the FIAT model.

bfe : Optional[SpatialJoinModel], default None

The BFE model.

svi : Optional[SviConfigModel], default None

The SVI model.

road_width : Optional[float], default 5

The road width in meters.

return_periods : list[int], default []

The list of return periods for risk calculations.

floodmap_type : Optional[FloodmapType], default None

The type of floodmap to use.

references : WaterlevelReferenceModel, default WaterlevelReferenceModel(…)

The water level reference model.

sfincs_overland : FloodModel

The overland SFINCS model.

sfincs_offshore : Optional[FloodModel], default None

The offshore SFINCS model.

dem : Optional[DemModel], default None

The DEM model.

excluded_datums : list[str], default []

List of datums to exclude from plotting.

slr_scenarios : Optional[SlrScenariosModel], default None

The sea level rise scenarios model.

scs : Optional[SCSModel], default None

The SCS model.

tide_gauge : Optional[TideGaugeConfigModel], default None

The tide gauge model.

cyclones : Optional[bool], default True

Indicates if cyclones are enabled.

cyclone_basin : Optional[Basins], default None

The cyclone basin.

obs_point : Optional[list[ObsPointModel]], default None

The list of observation point models.

probabilistic_set : Optional[str], default None

The probabilistic set path.

Methods

Name Description
read Read a configuration file and returns the validated attributes.

read

database_builder.ConfigModel.read(toml_path: Union[str, Path])

Read a configuration file and returns the validated attributes.

Args: toml_path (str | Path): The path to the configuration file.

Returns

: ConfigModel: The validated attributes from the configuration file.
Back to top