Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the damage outputs #10079

Merged
merged 8 commits into from
Oct 23, 2024
Merged

Changed the damage outputs #10079

merged 8 commits into from
Oct 23, 2024

Conversation

micheles
Copy link
Contributor

@micheles micheles commented Oct 23, 2024

Warning: this PR is expected to BREAK:

  • the headers of the damage outputs, i.e. the action check_all_outputs
  • the /extract/agg_damages/<loss_type> REST API, i.e. the QGIS plugin

This change is crucial for implementing #9746.
NB: classical_damage/case_master uses now total_losses = structural+nonstructural.
NB: the numbers in case_7 are correct being total_losses = structural+nonstructural+contents.
NB: specifying total_losses is now mandatory in damage calculations with multiple loss types

@micheles micheles added this to the Engine 3.22.0 milestone Oct 23, 2024
@raoanirudh
Copy link
Member

What's the main change being introduced in this PR?

@micheles
Copy link
Contributor Author

micheles commented Oct 23, 2024

The headers, as written above. For instance

asset_id,taxonomy,lon,lat,structural~no_damage,structural~slight,structural~moderate,structural~extensive,structural~complete
-> asset_id,taxonomy,lon,lat,no_damage,slight,moderate,extensive,complete

Or there is a single loss type (therefore no need to specify it) or total_losses must be specified so the damage outputs correspond to that.

@micheles
Copy link
Contributor Author

Notice that no functionality is lost, in the worst case you can run multiple calculations (i.e. set total_losses=structural, then total_losses=nonstructural, then total_losses=contents). It can be annoying for the users but the simplification allows me to progress with #9746, so I need it right now.

@micheles micheles merged commit 7b6471c into master Oct 23, 2024
@micheles micheles deleted the damages branch October 23, 2024 04:26
micheles added a commit to gem/oq-irmt-qgis that referenced this pull request Oct 23, 2024
micheles added a commit to gem/oq-irmt-qgis that referenced this pull request Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants