wolfhece.insyde_be.INBE_gui

Author: University of Liege, HECE, Damien Sansen Date: 2025

Copyright (c) 2025 University of Liege. All rights reserved.

This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited.

Module Contents

wolfhece.insyde_be.INBE_gui.BATHYMETRY_FOR_SIMULATION = '__bathymetry_after_scripts.tif'[source]
wolfhece.insyde_be.INBE_gui._root_dir[source]
wolfhece.insyde_be.INBE_gui.hece_damage_path = b'.'[source]
wolfhece.insyde_be.INBE_gui.riverbed_trace_dilated(fn_read_simu, fn_output, threshold, type_extraction, id_begin=None, id_end=None, id_step=None)[source]

Recognizes the riverbed trace based on a simulation, where water depth above a given threshold is considered part of the riverbed. Inputs:

  • fn_read_simu: the simulation file to read.

  • fn_output: the location to save the riverbed trace as a .tiff file.

  • threshold: the water depth threshold above which the areas are considered riverbed.

wolfhece.insyde_be.INBE_gui.dilatation_mask_river(manager_inbe)[source]
wolfhece.insyde_be.INBE_gui.empty_folder(folder)[source]

Empties the content of a directory if it exists.

wolfhece.insyde_be.INBE_gui.get_transform_and_crs(tif_file)[source]

For TIFF file manipulation, reads the CRS and the geotransform, and returns them.

wolfhece.insyde_be.INBE_gui.create_shapefile_from_prop_tif(fn_tif, shapefile_path)[source]
wolfhece.insyde_be.INBE_gui.get_header_info(fn)[source]

Reads the headers from the file at path ‘fn’.

wolfhece.insyde_be.INBE_gui.get_header_comparison(list_fn)[source]

Reads the headers from the files in list_fn and compares them. The result ‘comp’ is True if the headers are identical, and False otherwise.

wolfhece.insyde_be.INBE_gui.display_info_header(self_dx, self_nbxy, self_O, fn)[source]

Displays the header at the path ‘fn’, and update the values displayed in the window.

wolfhece.insyde_be.INBE_gui.vanish_info_header(self_dx, self_nbxy, self_O)[source]
wolfhece.insyde_be.INBE_gui.update_info_header(self_dx, self_nbxy, self_O, fn)[source]

Upate the displayed header values by reading the simulations headers if exist.

wolfhece.insyde_be.INBE_gui.search_for_modif_bath_and_copy(main_gpu, from_path, path_vuln)[source]

When loading gpu simulations for last step extraction, search for modified bath_ topography file, according to the structure coded in the scenarios manager. If they exist, their extent is copied to CHANGE_VULNE, called vuln_ and MNTmodifs_, to enable the user to modify it later. In addition, returns True if such files exist and False if they do not.

wolfhece.insyde_be.INBE_gui.create_INPUT_OUTPUT_forScenario(maindir, study_area, scenario, simu_gpu=None, danger=None)[source]

Creates folder for a new study area or/and scenario. The last argument simu_gpu is used when loading simulation (indicates path to the simulation folder), if not used, indicate None to ignore it.

class wolfhece.insyde_be.INBE_gui.INBEGui(parent=None, width=1024, height=500)[source]

Bases: wx.Frame

Inheritance diagram of wolfhece.insyde_be.INBE_gui.INBEGui

The main frame for the damage computation with INSYDE-BE (=INBE)

_manager = None[source]
_mapviewer = None[source]
_func[source]
df_results_Ti = None[source]
property mapviewer[source]
layout(self_fct)[source]

Update the layers for the main buttons

on_button_click(event)[source]
on_button_click2(event2)[source]
onRiverbed(event)[source]

Two options for the ‘Update Riverbed’ button: either the new riverbed trace file already exists and the user selects it, or it does not exist, and the user points to a no-overflow simulation, allowing the code to create the trace.

layout_listbox(self_fct)[source]

Changes the layout for the listbox : light grey.

InitUI()[source]
OnSims(e: wx.ListEvent)[source]

Load sim into the mapviewer

OnSimsDBLClick(e: wx.ListEvent)[source]

Load sim into the mapviewer

OnCheckFiles(e)[source]

Check the files

OnHydrodynInput(e)[source]

A test to check if the FILLED water depths files exist. -If YES : the code can go on -If NO : either need to be computed, either the code will use the baseline ones

OnCheckPond(e)[source]
OnCheckPICC(e)[source]
OnMainDir(e)[source]

Selects the main directory to be read.

OnStudyArea(e)[source]

Change the study area

OnScenario(e)[source]

Change the scenario

OnLoadingSimu(e)[source]

Link between INBE and simulations -Load a hydraulic scenarios from the scenario manager -Create scenario and study area if needed.

OnDanger(e)[source]

Specific button to extract last step or to compute the wd danger map

OnDEM(e)[source]

Import and create the inputs for the interpolation routine (name including ‘MNT_…’ and ‘MNT_…_with_mask’. See function MTN_And_mask_creation_all

check_and_convert_rasters(manager, prefix, type_file, numpy_type, nodata_value, message_supp=None)[source]
OnCheckMNTmodifs(e)[source]

Checks if scenarios MNTmodifs_ exist in CHANGE_VULNE and test the type (float32)

OnInterpolation(e)[source]

Interpolates the last extracted time steps present in LAST_STEP_EXTRACTED using the fast marching interpolation routine, by creating a batch file while performing multiple checks on the required input files.

OnToggleAdmin(e)[source]
OnInput(e)[source]
OnDefault_TEMP(e)[source]

Impute default values to inputs and run INBE on each Ti

Oncombined_OUTPUT(e)[source]

Compute the combined damage

OnReadResults(e)[source]
OnSetComp0(e)[source]

Analyze two or more scenarios with a baseline