With this functions raster values are extracted by various overlaying spatial points created within a polygon shapefile.
1 2 |
rr |
Raster object; raster image |
pp |
Spatial object; polygon file |
points |
integer; Number of SpatialPoints created in the Polygon |
samp.type |
character; Sampling technique for the Spatial Points generated as described in the spsample() function of the "sp" package |
weight |
boolean; Weighting image considering the underlaying rasters a differentweight in the extraction computation. This makes pixel partially located within a polygon less weighted. Input is T/F |
narm |
boolean; removes na values |
seed |
integer; applies the set.seed() function enabling the control over |
returnVals |
boolean; return all extracted values |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.