classify_grid() has been renamed to DoU_classify_grid() to create a more consistent API and to better indicate that this function is specifically designed for the DEGURBA grid classification.
classify_grid(
data,
level1 = TRUE,
parameters = NULL,
values = NULL,
regions = FALSE,
filename = NULL
)SpatRaster with the grid cell classification
path to the directory with the data, or named list with the data as returned by function DoU_preprocess_grid()
logical. Whether to classify the grid according to first hierarchical level (TRUE) or the second hierarchical level (FALSE). For more details, see section "Classification rules" below.
named list with the parameters to adapt the standard specifications in the Degree of Urbanisation classification. For more details, see section "Custom specifications" below.
vector with the values assigned to the different classes in the resulting classification:
If level1=TRUE: the vector should contain the values for (1) urban centres, (2) urban clusters, (3) rural grid cells and (4) water cells.
If level1=FALSE: the vector should contain the values for (1) urban centres, (2) dense urban clusters, (3) semi-dense urban clusters, (4) suburban or peri-urban cells, (5) rural clusters, (6) low density rural cells, (7) very low density rural cells and (8) water cells.
logical. Whether to execute the classification in the memory-efficient pre-defined regions. For more details, see section "Regions" below (Note that this requires a large amount of memory).
character. Output filename (with extension .tif). The grid classification together with a metadata file (in JSON format) will be saved if filename is not NULL.