This function defines a longitude-latitude box region for a swath. It returns a swath region ID that is used by the EOS_SW_EXTRACTREGION function to read all the entries of a data field within the region. A cross track is within a region if its midpoint is within the longitude-latitude box (0), or either of its endpoints is within the longitude-latitude box (1), or any point of the cross track is within the longitude-latitude box (2), depending on the inclusion mode designated by the user. All elements within an included cross track are considered to be within the region even though a particular element of the cross track might be outside the region. The swath structure must have both Longitude and Latitude (or Colatitude) fields defined.
In this example, we define a region bounded by 3 degrees longitude, 5 degrees latitude and 7 degrees longitude, 12 degrees latitude. We will consider a cross track to be within the region if its midpoint is within the region:
cornerlon = 3.d
cornerlat = 5.d
cornerlon = 7.d
cornerlat = 12.d
regionID = EOS_SW_DEFBOXREGION(swathID, cornerlon, cornerlat, 0)
Result = EOS_SW_DEFBOXREGION(swathID, cornerlon, cornerlat, mode)
Returns the swath region ID if successful and FAIL (–1) otherwise.
Swath id (long) returned by EOS_SW_CREATE or EOS_SW_ATTACH.
Longitude in decimal degrees (double) of box corners (double, 2 element, 1-D array).
Latitude in decimal degrees (double) of box corners (double, 2 element, 1-D array).
Cross Track inclusion mode (long). Allowable values are:
- 0 = Midpoint
- 1 = Endpoint
- 2 = Anypoint