Mapping Toolbox | ![]() ![]() |
Calculate spherical surface area enclosed by a polygon
Syntax
area = areaint(lats,longs) area = areaint(lats,longs,geoid) area = areaint(lats,longs,units) area = areaint(lats,longs,geoid,units)
Description
This command allows the measurement of areas enclosed by arbitrary polygons. This is a numerical estimate, using a line integral based on Green's Theorem. As such, it is limited by the accuracy and resolution of the input data.
area = areaint(lats,longs) returns the surface area enclosed by the polygon defined by the column vectors lats
and longs
. Multiple polygons can be delineated by NaN
s. The output area
is a fraction of the unit sphere's area of 4, so the result ranges from 0 to 1.
area = areaint(lats,longs,geoid) allows the specification of the geoid model with the two-element geoid vector geoid
. When a geoid
is input, the resulting area
is given in terms of the (squared) units of the geoid
. For example, if the geoid almanac('earth','geoid','kilometers')
is used, the resulting area will be in km2. The default geoid is the unit sphere.
area = areaint(lats,longs,geoid,units
) specifies the units of the inputs lats
and longs
, which are 'degrees'
by default.
Examples
Consider the area enclosed by a 30º lune, from pole to pole and bounded by the Prime Meridian and 30ºE. You can use the command areaquad
to get an exact solution:
This is 1/12 the spherical area. The more points used to define this polygon, the more integration steps areaint
will take, improving the estimate. This first attempt takes a point every 30º of latitude:
lats = [-90:30:90,60:-30:-60]'; longs = [zeros(1,7),30*ones(1,5)]'; area = areaint(lats,longs) area = 0.0792
Now, a little finer, perhaps one point every 1º of latitude:
lats = [-90:1:90,89:-1:-89]'; longs = [zeros(1,181),30*ones(1,179)]'; area = areaint(lats,longs) area = 0.0833
Limitations
As noted above, this is a line integral estimation, only as good as the accuracy and the density of the polygon vertex data. However, given sufficient data, the areaint
command is the best method for determining the areas of complex polygons, such as continents, cloud cover, and other natural or derived features. The calculations in this function employ a spherical Earth assumption. For nonspherical geoids, the latitude data is converted to the auxiliary authalic sphere.
See Also
almanac |
Planetary data |
areamat areaquad |
Other area calculations |
![]() | antipode | areamat | ![]() |