.sampleRastSubregion | R Documentation |
This function selects random points from a randomly-selected subregion of raster. The subregion is selected by randomly locating a point on the any non-NA
cell in the raster, buffering it by a given width, rasterizing the buffered area, then selecting from any non-NA
cells in this region.
.sampleRastSubregion(rast, n, width, restrict = TRUE, circleCent = NULL, ...)
rast |
Raster, RasterStack, or RasterBrick demarcating the area in which randomized sites are to be placed. If a RasterStack or a RasterBrick is used then the first layer will be used (i.e., so cells with |
n |
Positive integer, number of random points to select. |
width |
Positive numeric, size of buffer radius (in map units–usually meters). |
restrict |
Logical, if |
circleCent |
A SpatialPoints or SpatialPointsDataFrame object. The default value is |
... |
Other arguments (not used). |
A list object with four elements: 1) A SpatialPoints object of randomly selected points; 2) a SpatialPoints object representing the center of the circle chosen to represent the subregion; 3) a numeric value representing the buffer width; and 4) a numeric value representing the number of non-NA
cells in the region from which the points were selected.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.