From 6919a56c67ce0355226a6fb9eb2b4d21c9e0b7db Mon Sep 17 00:00:00 2001 From: danddr Date: Wed, 31 Jan 2024 09:29:15 +0100 Subject: [PATCH] decreasing id raster digits --- R/paSampling.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/paSampling.R b/R/paSampling.R index ac52785..c5070e0 100644 --- a/R/paSampling.R +++ b/R/paSampling.R @@ -64,7 +64,7 @@ paSampling <- function (env.rast=NULL, pres = NULL, thres = 0.75, H = NULL, grid dt <- terra::as.data.frame(rpc$PCs[[c("PC1", "PC2")]], xy = TRUE) dt$myID <- seq_len(nrow(dt)) id <- dt[, c("x", "y", "myID")] - id_rast <- terra::rast(id, digits = 10, type = "xyz") + id_rast <- terra::rast(id, digits = 3, type = "xyz") id_rast <- terra::resample(id_rast, env.rast) terra::ext(id_rast) <- terra::ext(env.rast) PC12 <- c(rpc$PCs[[c("PC1", "PC2")]], id_rast)