Description Usage Arguments Value Examples
extractRasterLayer
extracts data from a raster layer with a given polygon shape. It support multicore processing
through the parallel package and clustering with a default cellsize of 100 meters.
1 2 | extractRasterLayer(raster, shape, multicore = TRUE, gsize = 100,
showMessages = TRUE, fun = stats2perform, as.shape = FALSE)
|
raster |
Raster. Raster to be extracted |
shape |
Shapefile. Shape which define the polygon to be extracted |
multicore |
Optional. Logical. If TRUE means multicore processing. By default is TRUE |
gsize |
Optional. Numeric. Size of each cell in meters. 100 m by default |
showMessages |
Optional. Logical. If TRUE all processing messages will be shown |
fun |
Optional. Function. Function to summarize the values (e.g. mean). By default stats2perform is used. |
as.shape |
Optional. Logical. If as.shape=TRUE, it returns a shape instead of a data.frame. By default is FALSE |
a data.frame or a Spatial object.
1 2 3 4 | ## Not run:
shape.extracted <- extractRasterLayer(raster, shape, as.shape = T)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.