Commit 5e126a5e authored by Johannes Knoch's avatar Johannes Knoch
Browse files

checks now only for .tif files which begin with step_*; no longer generate kmz...

checks now only for .tif files which begin with step_*; no longer generate kmz files, but the unzipped version consisting of a kml and a png because plot_results.r checks now for png and no longer for kmz
parent d2a87c9a
......@@ -92,17 +92,17 @@ multi_Class_Sampling <- function(in.raster,
max_num_cores = 5,
plot_on_browser = TRUE) {
# Checks if its a new or a resumed run and asks the user to remove all .tif
# Checks if its a new or a resumed run and asks the user to remove all step_*.tif
# files from the results folder in case of a new run.
if(step == 1){
if (length(list.files(
outPath,
pattern = ".tif$",
pattern = "step_(.*).tif",
all.files = FALSE,
include.dirs = TRUE,
no.. = TRUE
)) != 0) {
message("Remove all .tif files from the Results directory! Don't forget to save them and the other files.
message("Remove all step_*.tif files from the Results directory! Don't forget to save them and the other files.
All other files will be overwriten when a new sampling is started.")
return(NULL)
}
......@@ -518,7 +518,7 @@ multi_Class_Sampling <- function(in.raster,
kml <- raster::projectRaster(dummy,
crs = "+proj=longlat +datum=WGS84",
method = 'ngb')
raster::KML(kml, paste(outPath, paste("step_", ni, sep = ""), sep = ""), overwrite = overwrite)
raster::KML(kml, paste(outPath, paste("step_", ni, sep = ""), sep = ""), overwrite = overwrite, zip = FALSE)
thres <- as.numeric(decision)
thres <- thres + num_models
......
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