Commit 7d08de50 authored by Romulo Pereira Goncalves's avatar Romulo Pereira Goncalves
Browse files

Remove prints.

parent ea81cedd
......@@ -91,19 +91,15 @@ saveSamplePoints <-
dummy_raster[dummy_raster == num_models] <- NA
dummy_raster[dummy_raster > num_models] <- 1
print("1")
###extract only class samples
for (i in 1:length(ref_samples)) {
if (length(dim(ref_samples[[i]])) != 0)
{
print("1a")
if (is.na(ref_switch[i]) == F) {
print("1b")
j = j + 1
collect[[j]] <-
ref_samples[[i]][which(ref_samples[[i]]@data == 1), ]
} else {
print("1c")
j = j + 1
collect[[j]] <-
ref_samples[[i]][which(ref_samples[[i]]@data == 2), ]
......@@ -111,24 +107,18 @@ saveSamplePoints <-
}
}
print("2")
result <- do.call(rbind, collect)
if (!is.null(result)) {
print("3a")
res <- raster::extract(dummy_raster, result)
if (length(which(is.na(res))) > 0) {
print("3aa")
result <- result[-which(is.na(res)), ]
}
} else {
print("3b")
result <-
sp::SpatialPolygonsDataFrame(Sr = sp::SpatialPolygons(list()), data = data.frame())
}
print("4")
raster::crs(result) <- raster::crs(dummy_raster)
print("5")
output_format <- match.arg(output_format)
if (output_format == "geojson") {
file_path <- paste(in_path, "SamplePoints_step_", step, "_", class_name, ".geojson", sep = "")
......
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