Opened 12 years ago
Closed 10 years ago
#339 closed defect (fixed)
Incorrect anchor in ShakeMap gridded regions
Reported by: | Kevin Milner | Owned by: | Kevin Milner |
---|---|---|---|
Priority: | critical | Milestone: | OpenSHA 1.3 |
Component: | sha | Version: | 1.2.3 |
Keywords: | Cc: | HSeligson@… |
Description
Hope Seligson discovered a problem with our Scenario ShakeMap? applications. She created a map with the following region:
-124.7333/-120.1333/36.55/39.65
spacing = 0.1
The resulting map came out with black (NaN) bands on some latitudes. I dug into it and the problem seems to be that the gridded region is created with an anchor at (0, 0) and thus all points are evenly gridded as such and don't lie on the user specified boundaries. For example, here are some points from the file map_data.txt file:
36.6 -124.7 0.022956406778848214 36.6 -124.59999999999998 0.024458295577207533 36.6 -124.49999999999999 0.026070266564495254 36.6 -124.39999999999999 0.027801871124927005 36.6 -124.3 0.02966371817415886 36.6 -124.2 0.03166770421582367 36.6 -124.1 0.033827046797853096
As you can see, these don't line up with the grid that Hope specified. In fact, if you do a minmax, you'll see that the region is completely off:
[9:opensha] /scratch/opensha/gmt_debug/simple: minmax pga_map_data.txt pga_map_data.txt: N = 1426 <36.6/39.6> <-124.7/-120.2> <0.00812434/0.565637>
We can fix this in one of two ways:
- Just use minLat, minLon as the anchor and always use the users region exactly
- Adjust the user specified region to conform to an anchor at (0, 0). In this case, Hope's new region would be -124.7/-120.2/36.6/39.6.
I vote for (1.), but am open to either option.
Attachments (1)
Change History (3)
Changed 12 years ago by
comment:1 Changed 12 years ago by
Also of note (from Hope):
FYI, the region I was working with was the pre-set “SF Bay Area” “Region of Interest” available through the Control Panel.
comment:2 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
It looks like this has been previously fixed in trunk, but I made sure that all possible places in our codebase deal with this correctly in [10270]. Fix will be included in next release.
shakemap showing incorrect gridding