Learn R Programming

sensors4plumes (version 0.9.3)

areaSDF: Areas of elements of SpatialDataFrame objects

Description

Returns the areas of all elements in a SpatialDataFrame object, e.g. of all grid cells in a SpatialPixelsDataFrame or of all Polygons in a SpatialPolygonsDataFrame. If the elements are Points, 0s are returned with a warning.

Usage

areaSDF(x)

Arguments

Value

Vector of the areas of elements of the SpatialDataFrame (same length as the SpatialDataFrame): SpatialIndexDataFrame, SpatialPointsDataFrame: 0s, with warning. SpatialPixelsDataFrame, SpatialGridDataFrame: cell size, repeated for each cell SpatialPolygridDataFrame: sum of cell sizes of all cells related to the respective index value SpatialPolygonsDataFrame: sum of area of all polygons related to the respective Polygons object SpatialLinesDataFrame: sum of length of lines related to the respective Lines object

Examples

Run this code
# NOT RUN {
data(SIndexDF)
areaSDF(SIndexDF)

data(SPolygridDF)
areaSDF(SPolygridDF)

data(SLinesDF)
areaSDF(SLinesDF)
# }

Run the code above in your browser using DataLab