| gridarea2d | R Documentation |
The function returns a data.table of area in square meters of a lon-lat grid.
Coordinates must be gridcell midpoint and the northern and southern edges are
calculated as half of the distance to the next element in the latitude vector.
Uses gridarea1d.
gridarea2d(lon, lat, scale = 1, ellipse = FALSE)
lon |
vector of longitudes |
lat |
vetor of latitudes |
scale |
multiplicator. If 1 (default) unit m^2 |
ellipse |
TRUE (polar and equatorial radius differ) or FALSE (default, polar and equatorial radius are the same) |
data.table of gridcells with columns c("Lon", "Lat", "area")
Joerg Steinkamp joerg.steinkamp@senckenberg.de
lon <- seq(- 179.75, 179.75, 0.5)
lat <- seq(89.75,-89.75,-0.5)
sum(gridarea2d(lon,lat, scale=1.e-12)$area)
sum(gridarea2d(lon,lat, scale=1.e-12, ellipse=TRUE)$area)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.