gem/oq-irmt-qgis

Unable to display Aggregated Loss Distributions on scenario_damage calculation with consequence models

alejocaldeGEM opened this issue · 2 comments

With a scenario_damage calculation the plug-in allows the user to visualize aggregated damage results using the Aggregate button -> Damage distribution. The issue arises for aggregated losses. If the user provides fragility curves and consequence models, losses are estimated, and it is possible to make loss maps using Asset Risk Distribution -> Load layer. However, if the Asset Risk Distribution -> Aggregate button is used, only Damage distribution is posible to visualize. The Output Type drop down menu is greyed and the user cannot choose Loss distribution. See the images below.

This prevents the user to see loss distributions per loss type and tags, as it is possible on a scenario_risk calculation.

oq-irmt-qgis v3.15.2 (experimental)
OpenQuake v3.16.0-git1fe94fe15e
QGIS 3.22.14
Windows 10

issue_3 15 2_lossdist

2_Scenario_Risk_Antioquia.zip

This is complicated, for at least two reasons:

  1. the plugin is structured with a 1-to-1 visualization approach, that for each OQ engine output type produces exactly one kind of visualization in the Data Viewer. Now that losses have been incorporated in the same output type containing damages, the plugin needs to implement a 1-to-many visualization approach
  2. the plugin leverages the OQ engine "extract" API, that needs to be modified to make it possible to filter losses properly from this output, similarly to what is done for another existing output. Furthermore, if I understand correctly, we would need an additional selector in the GUI, to select a specific consequence, that might not be always "losses". Perhaps this would be needed also for the output for which we are already able to visualize and filter the losses.

Long story short: this is not a quick and easy change and it requires a fair amount of work both on the plugin and on the engine sides.

Fixed in #813