scale_by_pixel_area | R Documentation |
Calculates the area (in meters) of each pixel in a raster, scales the value
of each pixel by the area, applies the desired scale factor, and returns the
result as a RasterLayer
. Useful for calculating class areas based on
a classified raster in a geographic coordinate system. Assumes that raster
is not rotated (latitudes of every pixel in a given row are identical).
Processes block by block to support handling very large rasters.
scale_by_pixel_area(
x,
filename,
datatype,
pixel_areas = NULL,
scale_factor = 1
)
x |
a |
filename |
(optional) filename for output raster |
datatype |
(optional) datatype for output raster see
|
pixel_areas |
a vector giving the area of each cell in a single column
of the raster. See |
scale_factor |
a value to scale the results by |
RasterLayer
with pixel areas (in meters)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.