Description Usage Arguments Details Value Examples

Raster objects: Compute the approximate surface area of cells in an unprojected (longitude/latitude) Raster object. It is an approximation because area is computed as the height (latitudial span) of a cell (which is constant among all cells) times the width (longitudinal span) in the (latitudinal) middle of a cell. The width is smaller at the poleward side than at the equator-ward side of a cell. This variation is greatest near the poles and the values are thus not very precise for very high latitudes.

SpatialPolygons: Compute the area of the spatial features. Works for both planar and angular (lon/lat) coordinate reference systems

1 2 3 4 5 6 7 8 |

`x` |
Raster* or SpatialPolygons object |

`filename` |
character. Filename for the output Raster object (optional) |

`na.rm` |
logical. If |

`weights` |
logical. If |

`...` |
additional arguments as for |

If `x`

is a RasterStack/Brick, a RasterBrick will be returned if `na.rm=TRUE`

. However, if `na.rm=FALSE`

, a RasterLayer is returned, because the values would be the same for all layers.

If `x`

is a Raster* object: RasterLayer or RasterBrick. Cell values represent the size of the cell in km2, or the relative size if `weights=TRUE`

If `x`

is a SpatialPolygons* object: area if each spatial object in squared meters if the CRS is longitude/latitude, or in squared map units (typically meter)

1 2 3 4 5 6 7 8 |

rspatial/raster documentation built on July 23, 2019, 8:15 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.