(Potentially) Fixes bug of shakemaps not working across antimeridian
Addresses #18 (closed)
when the bounding box of the shakemap region crossed the antimeridian (not the "international date line" - I have been corrected on that terminology!) the shakemap could not be built. There were several steps in the calculation that prevented it, but it ultimately originates from the
ulon of the bounding box being lower than the
llon and thus no valid site model was built. This MR makes the necessary fixes in the shakemap code to ensure that the ground motion values are calculated at the sites correctly when the earthquake is near the antimeridian.
In the second modification, the generation of the raster and contours has been modified. For the contours these are re-centred such that longitudes in the western hemisphere (-180˚E to 0˚E) are shifted to an antimeridian centred system (i.e. 180˚E to 360˚E). Thus the contour can now contain longitudes greater than 180˚E. For the raster we use
reproject functionality to transform the raster passing the
CENTER LONG = 180 keyword to the
GDAL backend. This does not raise an error and seems to export complete rasters.
Here is an example of the shakemap in QGIS:
@nils @eggi Honestly, I have no idea whether this has worked or not. The results seem OK in QGIS when I set the basemap projection to EPSG:4326, but if I switch to another project (e.g. EPSG:3857) then it only shows me the portion of the raster in the eastern hemisphere. This could be just a QGIS issue, though, and it might be fine on the Earthquake Explorer server. I will keep issue #18 (closed) open after merging this MR until there is confirmation that this either i) works directly or ii) can be integrated into the pipeline.
An antimeridian crossing workflow has also been added to the workflow test cases.