View source: R/SOptim_CalcSegmentStats.R
calculateSegmentStats | R Documentation |
This function allows calculating aggregation statistics by segment ID to be used in the
classification stage. This function employs dtplyr
(based on data.table
)
and dplyr
verbs for processing.
calculateSegmentStats(
rstFeatures,
rstSegm,
funs = c("mean", "sd"),
na.rm = TRUE,
bylayer = FALSE,
tiles = NULL,
subset = NULL,
progressBar = FALSE
)
rstFeatures |
A string defining the path to the raster features or a
|
rstSegm |
A string defining the path to the raster with segment IDs or a
|
funs |
A character vector with the name(s) of the functions used to aggregate
data (default: |
na.rm |
Boolean defining if NA's should be removed (default: TRUE). |
bylayer |
Calculate statistics layer by layer instead of all at once? (slightly increases computation time but spares memory load; default: FALSE). |
tiles |
Number of times to slice the SpatRaster across row
and column direction. The total number of tiles will be given by:
|
subset |
A vector defining which segments should be selected. |
progressBar |
Boolean. Show progress bar? (default: FALSE). |
A data frame containing segment ids (first column, SID) and aggregated features. The name of the aggregation function will be appended to the name of each raster feature.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.