Opened 13 years ago

Closed 13 years ago

#115 closed enhancement (fixed)

Add Nitin's modifications of gridded regions

Reported by: Ned Field Owned by: Peter Powers
Priority: major Milestone: OpenSHA 1.2
Component: sha Version:
Keywords: Cc:


Requirement was to provide an ability where lat and lon intervals can be specified differently. Usually 1 degree lat and lon translate to 111 kms but as we go up North, within Canada, that is not the case, 1 degree lat is not equivalent to 1 degree lon, ie. 111kms. In fact 1 degree lon might translate to may be 40-50kms (don't quote me the exact number). Thus this requirement.

To accomplish this, I modified the GriddedRegion? class, where it takes lat interval as well as lon interval. Internal functionality of the class remain the same, just instead of using a common interval when creating locations within the gridded region, all longitudes will be based on lon spacing and all latitudes will be based on lat interval. Once the list of lats and lons are created, the one's within the polygon remain and others are excluded (this part exactly what it was earlier).

BTW, the ability to specify a common interval for both lat/lon still remains, and internally within the code both lat and lon spacing will be using this common spacing.

Specifying a different lat/lon spacing (in degrees) helps to keep them equidistant in kms and thus reduce event set while keeping the hazard almost the same.

I did test to the extent that all locations generated, using different spacing, are within the given polygon.

Change History (1)

comment:1 Changed 13 years ago by Peter Powers

Resolution: fixed
Status: newclosed

Changes committed in [7984].

Unit tests need to be reviewed but internal logic for differential lat-lon spacing is the same as for similarly spaced lat-lon.

Note: See TracTickets for help on using tickets.