View source: R/sampleRasterStackByMU.R
sampleRasterStackByMU | R Documentation |
Sample a raster stack by map unit polygons, at a constant density.
sampleRasterStackByMU(
mu,
mu.set,
mu.col,
raster.list,
pts.per.acre,
p = c(0, 0.05, 0.25, 0.5, 0.75, 0.95, 1),
progress = TRUE,
estimateEffectiveSampleSize = TRUE,
polygon.id = "pID"
)
mu |
a |
mu.set |
character vector of map unit labels to be sampled |
mu.col |
column name in attribute table containing map unit labels |
raster.list |
a |
pts.per.acre |
target sampling density in |
p |
percentiles for polygon area stats, e.g. |
progress |
logical, print a progress bar while sampling? |
estimateEffectiveSampleSize |
estimate an effective sample size via Moran's I? |
polygon.id |
Column name containing unique polygon IDs; default: |
This function is used by various NRCS reports that summarize or compare concepts defined by collections of polygons using raster data sampled from within each polygon, at a constant sampling density. Even though the function name includes "RasterStack", this function doesn't actually operate on the "stack" object as defined in the raster package. The collection of raster data defined in raster.list
do not have to share a common coordinate reference system, grid spacing, or extent. Point samples generated from mu
are automatically converted to the CRS of each raster before extracting values. The extent of each raster in raster.list
must completely contain the extent of mu
.
A list
containing:
raster.samples
a data.frame
containing samples from all rasters in the stack
area.stats
a data.frame
containing area statistics for all map units in the collection
unsampled.ids
an index to rows in the original SPDF associated with polygons not sampled
raster.summary
a data.frame
containing information on sampled rasters
Moran_I
a data.frame
containing estimates Moran's I (index of spatial autocorrelation)
D.E. Beaudette
constantDensitySampling
, sample.by.poly
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.