Orthographic projection gives wrong results when considering lines crossing international date line
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenQuake Hazard Library |
Fix Released
|
High
|
Damiano Monelli |
Bug Description
The method ``openquake.
In particular given a line that crosses the IDL, converting the coordinates to the cartesian space and then back to spherical coordinates does not give the original values, below an example:
>>> from openquake.
>>>
>>>
>>> west = 179.0
>>> east = -179.0
>>> south = -1.
>>> north = 1.
>>> proj = utils.get_
>>>
>>> lons = [179.0, -179.0]
>>> lats = [-1, 1]
>>>
>>> xx, yy = proj(lons, lats)
>>>
>>> new_lons, new_lats = proj(xx, yy, reverse=True)
>>> new_lons
array([-181., -179.])
The original longitudes ([179.0, -179.0]) are not reproduced, what I get is ([-181., -179.0])
This error has been found when running a hazard calculation with OpenQuake with a source model considering a fault crossing the IDL, in this case OQ gives an error because longitude values are not in the expected range [-180., 180]
Changed in oq-hazardlib: | |
importance: | Undecided → High |
assignee: | nobody → Damiano Monelli (monelli) |
Changed in oq-hazardlib: | |
status: | New → Fix Committed |
Changed in oq-hazardlib: | |
milestone: | none → 0.12 |
Changed in oq-hazardlib: | |
status: | Fix Committed → Fix Released |
Resolved by https:/ /github. com/gem/ oq-hazardlib/ pull/116.