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

Support Impact Scenarios [RA/IA API] #9

Closed
p-a-s-c-a-l opened this issue Jul 1, 2019 · 13 comments
Closed

Support Impact Scenarios [RA/IA API] #9

p-a-s-c-a-l opened this issue Jul 1, 2019 · 13 comments
Assignees
Labels
BB: Catalogue of ER & AO Catalogue of Elements at Risk and Adaptation Options Building Block enhancement New feature or request SHOWSTOPPER Feature or bug, that, if not addressed, renders the CSIS essentially useless
Milestone

Comments

@p-a-s-c-a-l
Copy link
Member

p-a-s-c-a-l commented Jul 1, 2019

This is related to the implementation of Impact/Risk assessment model with EMIKAT. We need an API for triggering the calculation of a new impact scenario and for accessing the results. Adaptation Scenarios are addressed later!

Triggering can be done by the Scenario Selection UI as discussed here.

  • $scenarioId CSIS will sent the internal EMIKAT id (not the Drupal UUID of the study).
  • $studyArea this is probably not needed if the study has already been made know to EMIKAT via the [https://github.com/Configuring initial Study trigger #6](initial study trigger)
  • $eventid[] here CSIS probably just needs to send the ids of two events (baseline + future) selected by the user.

Accessing the results is already possible as described in this issue. We currently use them in the Table Component, the Map Component and the MCDA Tool.

The respective RA/IA Data Package Resource has to be updated accordingly and example request / response URLs (including WMS URLs for RA/IA maps) have to be added to the Wiki.

@p-a-s-c-a-l
Copy link
Member Author

Example REST API URL

https://service.emikat.at/EmiKatTst/api/scenarios/2846/feature/view.2812/table/data

Questions:

  • 2846 to be replaced with $emikat_id, but what about view.2812? Is it always the same view id?
  • data format, e.g. # of damage classes, will change according to new impact model, right? When will it be available?

Example WMS API URL

https://service.emikat.at/geoserver/clarity/wms?service=WMS&version=1.1.0&request=GetMap&layers=clarity:view.2813&styles=DamageLevel1Q&bbox=4650500.0,1942000.0,4713000.0,1995500.0&width=768&height=657&srs=EPSG:3035&format=image%2Fgif&cql_filter=HAZARD_EVENT_ID=1

Questions:

  • why no $emikat_id in WMS url?
  • what about the clarity:view.2813?

@humerh
Copy link

humerh commented Aug 7, 2019

You need only replace the $emikat_id (for our example 2846).
The term "view.2813" or "clarity:view.2813" is an anonomized notation of a specific report. (report_Id). This report_id does not change, if you change the study (or EmiKat-Scenario).

@p-a-s-c-a-l
Copy link
Member Author

p-a-s-c-a-l commented Aug 7, 2019

You need only replace the $emikat_id (for our example 2846).

Yes, but there's no $emikat_id in the WMS url.

@humerh
Copy link

humerh commented Aug 7, 2019

There willl be the need to include also the $emikat_id in the WMS url.

We will update the definition of WMS-Call for Impact Layers also as a consequence of the big changes in model calculation.
Then I will provide a new link.

@p-a-s-c-a-l

This comment has been minimized.

@p-a-s-c-a-l
Copy link
Member Author

p-a-s-c-a-l commented Sep 23, 2019

@humerh Can you please check what's wrong with this request?

Either the server is extremely slow or there is another problem, e.g. with from query parameters.

@p-a-s-c-a-l
Copy link
Member Author

In order to re-enable the Scenario Analysis Application, we need a new view with the sums for the whole study area. We need furtherore the possibility to omit some or all filters to be able to compare across events, scenarios and / or time periods.

@humerh
Copy link

humerh commented Sep 30, 2019

To get the total number of affected people:

https://service.emikat.at/EmiKatTst/api/scenarios/2846/feature/view.2994/table/data

You can filter this query also by the usual filter flags:

@p-a-s-c-a-l
Copy link
Member Author

Thanks! Could you also include the original damage probability? I know this can be calculated on client side, but I prefer to work with the original values calculated by the model.

@humerh
Copy link

humerh commented Sep 30, 2019

How should I do this? I cannot sum up the propabilities, and they are different for each cell.
You can only do it again after building the sum:

Propability_StudyArea = EXPOSEDQUANTITY_StudyArea / DAMAGEQUANTITY_StudyArea.

@DenoBeno
Copy link
Contributor

As discussed earlier today: is the per GRID_ID value of any use for the csis users?

In my opinion, the table view should sum over all grid cells and then show min/max/mean or mean/deviation values - for the whole project area.

Per grid data is only useful in combination with a map.

@p-a-s-c-a-l
Copy link
Member Author

We had this already working.

Once the results have been validated and the data model has stabilised, we can update the table component. I propose to wait for the specification of the flood impact result, so we don't have to redo this again for floods.

@p-a-s-c-a-l
Copy link
Member Author

RA/IA API available and working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BB: Catalogue of ER & AO Catalogue of Elements at Risk and Adaptation Options Building Block enhancement New feature or request SHOWSTOPPER Feature or bug, that, if not addressed, renders the CSIS essentially useless
Projects
None yet
Development

No branches or pull requests

3 participants