Commit c6e780d7 authored by Alison Beamish's avatar Alison Beamish
Browse files

Merge branch 'documentation' of...

Merge branch 'documentation' of git.gfz-potsdam.de:habitat-sampler/HabitatSampler into documentation
parents c66a49f4 8c98005a
Pipeline #23721 failed with stage
in 11 seconds
......@@ -92,16 +92,21 @@ multi_Class_Sampling <- function(in.raster,
max_num_cores = 5,
plot_on_browser = TRUE) {
if (length(list.files(
outPath,
all.files = FALSE,
include.dirs = TRUE,
no.. = TRUE
)) != 0) {
message("The results directory must be empty. Don't forget to save your previous results!!!")
return(NULL)
# Checks if its a new or a resumed run and asks the user to remove all .tif
# files from the results folder in case of a new run.
if(step == 1){
if (length(list.files(
outPath,
pattern = ".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.
All other files will be overwriten when a new sampling is started.")
return(NULL)
}
}
###first steps: data preparation
if (class(reference) == "SpatialPointsDataFrame") {
reference <- as.data.frame(raster::extract(in.raster, reference))
......
......@@ -12,6 +12,29 @@
#'
#' @export
plot_results <- function(inPath, color = NULL) {
# Compares the number of .kmz to that of .tif. If .tif files are missing the
# user's attention is drawn.
if (length(list.files(
outPath,
pattern = ".tif$",
all.files = FALSE,
include.dirs = TRUE,
no.. = TRUE
)) != length(list.files(
outPath,
pattern = ".kmz$",
all.files = FALSE,
include.dirs = TRUE,
no.. = TRUE
))) {
message("Make sure the number of the .tif files fits to the number of the .kmz files and that
there are no other files from previous runs.
If you have resumed a run, then the data of the aborted and the continued run needs
to be in the Results directory. You need them for plotting the classification map.")
return(NULL)
}
curr_wd <- getwd()
##3.a.1##
setwd(inPath)
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<GroundOverlay>
<name>layer</name>
<Icon><href>step_01.png</href><viewBoundScale>0.75</viewBoundScale></Icon>
<LatLonBox>
<north>53.0575767378268</north><south>53.0451084378268</south><east>12.6993218786229</east><west>12.6729488786229</west>
</LatLonBox>
</GroundOverlay></kml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<GroundOverlay>
<name>layer</name>
<Icon><href>step_02.png</href><viewBoundScale>0.75</viewBoundScale></Icon>
<LatLonBox>
<north>53.0575767378268</north><south>53.0451084378268</south><east>12.6993218786229</east><west>12.6729488786229</west>
</LatLonBox>
</GroundOverlay></kml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<GroundOverlay>
<name>layer</name>
<Icon><href>step_03.png</href><viewBoundScale>0.75</viewBoundScale></Icon>
<LatLonBox>
<north>53.0575767378268</north><south>53.0451084378268</south><east>12.6993218786229</east><west>12.6729488786229</west>
</LatLonBox>
</GroundOverlay></kml>
\ No newline at end of file
,2,3,4,5,6,7,8,11,12
Sentinel-2 band number,2,3,4,5,6,7,8,11,12
,,,,,,,,,
2018-03-03,1,2,3,4,5,6,7,8,9
2018-05-07,10,11,12,13,14,15,16,17,18
......
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