classify_grid {flexurba}R Documentation

Create the DEGURBA grid cell classification

Description

[Deprecated]

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.

Usage

classify_grid(
  data,
  level1 = TRUE,
  parameters = NULL,
  values = NULL,
  regions = FALSE,
  filename = NULL
)

Arguments

data

path to the directory with the data, or named list with the data as returned by function DoU_preprocess_grid()

level1

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.

parameters

named list with the parameters to adapt the standard specifications in the Degree of Urbanisation classification. For more details, see section "Custom specifications" below.

values

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.

regions

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).

filename

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.

Value

SpatRaster with the grid cell classification


[Package flexurba version 0.2.2 Index]