grid.info: Grid Information from Geographic (lat lon) Projections
Description
Since spatial grids in geographic projections do not have equal area or perimeters, grid.info extracts perimeter & area related information for latitudinal bands with differing longitudinal widths.
Outputs lengths are in m using Vincenty's equation (distance)and areas in m2. Surface areas are calculated summing surface areas of spherical polygons as estimated using l'Huiller's formula.
Usage
grid.info(lats,cellsize,r=6378137)
Arguments
lats
is a vector of latitudes representing the midpoint of grid cells
cellsize
is a single value (assuming square cells) or a two value vector (rectangular cells) representing the height (latitude) and width (longitude) of the cells
r
is a single value representing the radius of the globe in m. Default is for the WGS84 elipsoid
Value
a data.frame listing:
latthe latitude representing the midpoint of the cell
toplength of the top of the cell (m)
bottomlength of the bottom of the cell (m)
sidelength of the side of the cell (m)
diagnallength of the diagnals of the cell (m)
areaarea of the cell (m2)
References
information on l'Huiller's formula http://williams.best.vwh.net/avform.htm for more info)
code for estimating area of polygon on sphere was modified from http://forum.worldwindcentral.com/showthread.php?t=20724