grid.info {SDMTools} | R Documentation |
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.
grid.info(lats, cellsize, r = 6378137)
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 |
a data.frame listing:
lat |
the latitude representing the midpoint of the cell |
top |
length of the top of the cell (m) |
bottom |
length of the bottom of the cell (m) |
side |
length of the side of the cell (m) |
diagnal |
length of the diagnals of the cell (m) |
area |
area of the cell (m2) |
Jeremy VanDerWal jjvanderwal@gmail.com
information on l'Huiller's formula http://williams.best.vwh.net/avform.htm for moreinfo) code for estimating area of polygon on sphere was modified from http://forum.worldwindcentral.com/showthread.php?t=20724
#show output for latitudes from -87.5 to 87.5 at 5 degree intervals grid.info(lats=seq(-87.5,87.5,5), 5)