Commit 32491619 authored by Romulo Pereira Goncalves's avatar Romulo Pereira Goncalves
Browse files

Extract the code for classification into a function so we can run it in parallel.

parent c81688af
classify <- function(j, channels, switch, models, raster) {
ch <- channels[j]
res <- raster::predict(object = raster, model = models[[ch]])
if ([ch]) == F) {
res <- raster::reclassify(res, rbind(c(0.5, 1.5, 2), c(1.6, 2.5, 1)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment