diff --git a/R-package/R/outer_procedure.r b/R-package/R/outer_procedure.r index 902edd8af57fffa6a46264ec8a05727df312700a..f6fb139077808d184dfd593fecd9daf5101836e4 100644 --- a/R-package/R/outer_procedure.r +++ b/R-package/R/outer_procedure.r @@ -493,32 +493,23 @@ multi_Class_Sampling <- function(in.raster, if ( save_runs == TRUE) { run1 <- maFo_rf - save(run1, file = paste(outPath, paste("Run", ni, sep = ""), sep = "")) + save_run(outPath, + ni, + run1) remove(run1) } - ###rgdal version issue - not_good_workaround <- comment(dummy@crs) - comment(dummy@crs) <- "" - ### - raster::writeRaster( - dummy, - filename = paste(outPath, - paste("step_", - ni, - paste("_", classNames[index], sep = ""), - ".tif", - sep = ""), - sep = ""), - format = "GTiff", - overwrite = overwrite) + + save_class_tiff(outPath, + ni, + classNames, + index, + dummy, + overwrite) - ###rgdal version issue - comment(dummy@crs) <- not_good_workaround - ### - kml <- raster::projectRaster(dummy, - crs = "+proj=longlat +datum=WGS84", - method = 'ngb') - raster::KML(kml, paste(outPath, paste("step_", ni, sep = ""), sep = ""), overwrite = overwrite, zip = FALSE) + save_kml(outPath, + ni, + dummy, + overwrite) thres <- as.numeric(decision) thres <- thres + num_models