CHT: API for filtering events
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenQuake (deprecated) |
Fix Released
|
Medium
|
Giuseppe Vallarelli |
Bug Description
Design and implements an API for filtering events.
Geometry input parameters should be nhlib geometry class instances https:/
The following APIs should be designed and implemented:
1) Global search. Find all the events
2) Distance Search. Find all the events within a distance of (e.g. 300 km) from point (Lon, Lat)
3) Polygon Search. Find all the events that lie on the surface enclosed by a polygon (Use WKT to denote a polygon).
Each API return value should be of type sqlalchemy.
Each API result set can be further refined by applying one or more filters. E.g.
Event.distance_
Provide test cases for each API method. Some test fixtures can be found at https:/
Some query examples are given in https:/
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in openquake: | |
status: | New → In Progress |
Changed in openquake: | |
importance: | Undecided → Medium |
assignee: | nobody → Giuseppe Vallarelli (gvallarelli) |
status: | In Progress → Fix Committed |
Changed in openquake: | |
status: | Fix Committed → Fix Released |
Some test data:
i) test_query_ input_catalogue .csv - Short catalogue for geometry selection tests _2polygons_ 1point. txt - Description of the geometries of two polygons and one point for geographical distance testing. in_polygon_ results. csv - List for each measure in test_query_ input_catalogue .csv indicating True or False is the measure is inside polygon 1 or 2 respectively, and the distance (in km) from the point.
ii) test_geometries
iii) solution_