preprocess_units {flexurba} | R Documentation |
Preprocess the data for the DEGURBA spatial units classification
Description
preprocess_grid()
has been renamed to DoU_preprocess_grid()
to create a more consistent API and to better indicate that this function is specifically designed for preprocessing the units data to reconstruct the DEGURBA classification with DoU_classify_units()
.
Usage
preprocess_units(
units,
classification,
pop,
resample_resolution = NULL,
dissolve_units_by = NULL
)
Arguments
units |
character / object of class |
classification |
character / SpatRaster. Path to the grid cell classification of the Degree of Urbanisation, or SpatRaster with the grid cell classification |
pop |
character / SpatRaster. Path to the population grid, or SpatRaster with the population grid |
resample_resolution |
numeric. Resolution to which the grids are resampled during pre-processing. If |
dissolve_units_by |
character. If not |
Value
named list with the required data to execute the spatial units classification procedure, and their metadata. The list contains the following elements:
-
classification
: the (resampled and cropped) grid cell classification layer -
pop
: the (resampled and cropped) population grid -
units
: the (dissolved and filtered) spatial units (object of classsf
) -
metadata
: named list with the metadata of the input files. It contains the elementsunits
,classification
andpop
(with paths to the respective data sources),resample_resolution
anddissolve_units_by
if notNULL
. (Note that when the input sources are passed by object , the metadata might be empty).