User`s guide

R2008a
15-2
Functions for Working with Geographic Quadrangles
A geographic quadrangle is an area on the surface of a sphere or ellipsoid bounded on the
east and west by a pair of meridians and on the north and south by a pair of parallels.
In many ways, such an object is similar to a bounding rectangle in the plane, but they
can be difficult to work with because of the way longitudes wrap around and the way
meridians converge at the poles. For example,
The western longitude limit can have a larger numerical value than the eastern
longitude limit.
If one of the bounding latitudes is +90 or -90 degrees, the quadrangle has three sides
rather than four.
As noted below, the intersection of two geographic quadrangles might possibly
comprise two separate parts—with the eastern end of the first quadrangle
intersecting the western end of the second quadrangle, and vice versa.
Mapping Toolbox software typically represents a geographic quadrangle in terms of its
latitude and longitude limits, stored in 1-by-2 vectors having the forms
latlim = [southern_limit northern_limit]
lonlim = [western_limit eastern_limit]
Vectors like these have been used in various Mapping Toolbox functions since its
inception, and can appear in the input or output argument lists of over dozen functions.
In R2008a, three new functions let you query, intersect, and display geographic
quadrangles, and account for subtleties such as those described above:
ingeoquad — Returns true for points inside or on latitude-longitude quadrangle
intersectgeoquad — Returns intersection(s) of two latitude-longitude quadrangles
outlinegeoquad — Returns sampled polygon vertices for a latitude-longitude
geographic quadrangle
Use ingeoquad, for example, to check whether a geographic point is located within the
area covered by a regular data grid, given the latitude and longitude limits computed by
limitm.
Use intersectgeoquad to compute overlap, if any, between two quadrangles.
Interestingly, three general results are possible: no intersection, an intersection that is
itself a geographic quadrangle, and an intersection the comprises two distinct geographic
quadrangles. (The intersection can have two parts if the input quadrangles wrap around