nens / threedi-api-qgis-client

3Di Models & Simulations plugin
https://plugins.lizard.net/
Other
2 stars 0 forks source link

"New schematisation" wizard: check if DEM and friction files actually exist #483

Closed leendertvanwolfswinkel closed 1 year ago

leendertvanwolfswinkel commented 1 year ago

On the last page of the wizard: If user has chosen a DEM and/or friction file and clicks "Create Schematisation", please check if the files exist and are .tif / .tiff files. If not, show message "Chosen DEM file does not exist or is not a GeoTIFF (.tif or .tiff)" / "Chosen friction file does not exist or is not a GeoTIFF (.tif or .tiff)"

Screenshots from a video a user sent us:

image.png

image.png

Overmeen commented 1 year ago

The behavior is not entirely as expected.

In case a "Global 2D friction coefficient" is set to a (non-zero) value and the "Friction file" field is left empty, the user meant to add the global value. There should not be a pop-up message indicating the friction file does not exist.

image image

The behavior should be:

ldebek commented 1 year ago

@Overmeen Changes in the validation rules applied.

leendertvanwolfswinkel commented 1 year ago

@ldebek similar validation rules should also be applied to the DEM: The behavior should be: If "Digital elevation model" field is empty, create schematisation without reference to a DEM file If "Digital elevation model" field is not empty, check for file existence and validity file extension > if ok, create schematisation with dem file. If not, pop-up message "Chosen DEM file does not exist or is not a GeoTIFF (.tif or .tiff)"

ldebek commented 1 year ago

Changes applied.