Learn R Programming

sits (version 1.12.0)

.sits_classify_multicores: Classify a raster chunk using multicores

Description

Classifies a block of data using multicores. It breaks the data into horizontal blocks and divides them between the available cores.

Reads data from a file using Rgdal, then cleans the data for NAs and missing values. The clean data is stored in a data table that has all the time instances for all pixels of the block. The algorithm then classifies data on an year by year basis. For each year, it extracts the sub-blocks for each band.

After all cores process their blocks, it joins the result and then writes it in the classified images for each corresponding year.

Usage

.sits_classify_multicores(coverage, coverage_class, samples, ml_model,
  interval, filter, memsize, multicores)

Arguments

coverage

Tibble with metadata for a RasterBrick.

coverage_class

Taster layer objects to be written.

samples

Tibble with samples used for training the classification model.

ml_model

A model trained by sits_train.

interval

Classification interval.

filter

Smoothing filter to be applied to the data.

memsize

Memory available for classification (in GB).

multicores

Number of cores.

Value

List of the classified raster layers.