Provide function for distance calculation (spherical)

Bug #860476 reported by Muharem Hrnjadovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
High
Unassigned

Bug Description

We need to be able to calculate the shortest distance over the earth’s surface for two given points.

Please see http://www.movable-type.co.uk/scripts/latlong.html for details.

Changed in openquake:
status: New → Confirmed
importance: Undecided → High
milestone: none → 0.4.4
description: updated
tags: added: disaggregation hazard
summary: - Provide haversine formula for distance calculation
+ Provide function for distance calculation (spherical)
John Tarter (toh2)
Changed in openquake:
milestone: 0.4.4 → 0.4.5
Revision history for this message
Lars Butler (lars-butler) wrote :

A little bit of context for this bug:

The results produced by the Disaggregation are 5-dimensional matrices (Lat x Lon x Magnitude x Epsilon x TectonicRegionType). There are many options for producing subsets of this data. Some examples include: Lat-Lon-Magnitude, Lat-Lon-Epsilon, and Magnitude-Distance.

In the case of results involving Distance, the Distance must be calculated between a Lat/Lon value (in the matrix) and another site of interest. (Note: In this case, both locations have a depth of 0.0, indicating the surface projection of a 3D geographical point.)

OpenSHA currently provides some function(s) to calculate this distance. However, we plan to extract subsets from the full Disaggregation matrix asynchronously in Python using Celery tasks. Therefor, we need to implement the equivalent functionality on the Python side, and also test it against the OpenSHA code to make sure both methods produce the same results. (I suspect that the Shapely [1] module provides this functionality already, but we'll have to check. Either way, we still need to compare the results with those produced by OpenSHA.)

[1] http://pypi.python.org/pypi/Shapely

John Tarter (toh2)
Changed in openquake:
assignee: nobody → Andrea Cerisara (andreacerisara-b)
Changed in openquake:
status: Confirmed → In Progress
Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.