Computation over a set of sites

Registered by Andrea Cerisara

In order to implement the black box tests suite, the engine must support the computation over a set of user selected sites.

Whiteboard

Currently, the engine supports the computation of a region defined by the user in the configuration file. Given the polygon specified in the REGION_VERTEX parameter and the cell size of the region (specified in the REGION_GRID_SPACING parameter), the engine is able to extract the set of sites used during the computation. The algorithm can be found in openquake.shapes.Region.__iter__.

To add the computation over a set of custom sites, I would add a parameter (SITES) containing the custom sites to compute (we can follow the same convention used in the REGION_VERTEX parameter, i.e.: lat1, lon1, lat2, lon2, ..., latn, lonn).

The business rules are:
* if the computation is just HAZARD and the SITES parameter is empty or not specified, the engine should use the standard algorithm (using the REGION_VERTEX / REGION_GRID_SPACING parameters)
* if the computation is just HAZARD and the SITES parameter is specified, just these sites are taken into account in the computation (ignoring the REGION_VERTEX / REGION_GRID_SPACING parameters)
* if the computation is HAZARD + RISK, the engine collects the sites by parsing the exposure file (taking the assets that are defined on sites within the region boundaries). In this case, the user should be able to trigger the hazard computation on the whole region, or just on the sites defined in the exposure file.

# Tasks

* Make the engine capable to compute HAZARD and HAZARD + RISK jobs
* Delete all the code that produces geotiffs. Since the geotiffs stuff always needs the region to be specified, it's not compatible with this feature, but it's no longer used and can be deleted
* Make sure all the components of the engine ask for the sites to compute without referring to the specific region algorithm (so we can encapsulate the logic that provides the sites to the other components)
* Add the component that is able to apply the correct algorithm given a configuration file (both for hazard and risk)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.