in1Data.getInput
Fetch input data for avalanche simulations
Functions
check if in polygon read from shape file holes are present, if so error and save a plot to Outputs/com1DFA procedure: check if polygon has several parts |
|
compute the area of a polygon in xy using shapely |
|
compute the area covered by 1) a polygon by creating a raster from polygon or 2) where in a raster values > 0 projected area and actual area using a dem info |
|
compute stats of a polygon and a dem actual area (taking slope into account), projected area, max, mean, min elevation, mean slope |
|
create a csv file with info on release shp file on: max, mean and min elevation, slope and projected and real area |
|
derive raster and return path to raster file if derived from polygon, create raster with thickness read from lineDict and save to file fileName based on derivedFrom_shapeFileName - same format as DEM |
|
select release scenario, update configuration to only include thickness info of current scenario and return file path |
|
Fetch fileExt files and check if they exist and if it is not more than one. |
|
get dem file path in avaDir/Inputs |
|
get the DEM file path from a provided avalanche directory |
|
Fetch input datasets required for simulation, duplicated function because |
|
Fetch input datasets required for simulation, duplicated function because now fetch all available files simulation type set differently in com1DFA compared to com1DFAOrig: TODO: remove duplicate once it is not required anymore |
|
Fetch paths to dem and first release area shp file found |
|
add thickness of shapefiles to dictionary |
|
get time dependent release values from the csv table |
|
check for dem and load to dict |
|
check for relThFile and load to dict (if relTh is read from file) |
|
read the DEM (ascii or tif) file from a provided avalanche directory |
|
select release scenario |
|
add available release scenarios to ini file and set thickness values in ini files |