Opened 13 years ago

Closed 11 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@…


Hope Seligson discovered a problem with our Scenario ShakeMap? applications. She created a map with the following region:

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:

  1. Just use minLat, minLon as the anchor and always use the users region exactly
  2. 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)

map.png (181.4 KB) - added by Kevin Milner 13 years ago.
shakemap showing incorrect gridding

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by Kevin Milner

Attachment: map.png added

shakemap showing incorrect gridding

comment:1 Changed 13 years ago by Kevin Milner

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 11 years ago by Kevin Milner

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.