Skip to content

Commit

Permalink
tweaks to postProcessTerra messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
CeresBarros committed Feb 29, 2024
1 parent 1aed417 commit 601a9bc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions R/postProcessTo.R
Original file line number Diff line number Diff line change
Expand Up @@ -666,21 +666,18 @@ projectTo <- function(from, projectTo, overwrite = FALSE,
if (!terra::is.lonlat(from)) {
# if (sf::st_crs("epsg:4326") != sf::st_crs(from)) {
newRes <- terra::res(from)
messagePreProcess("Using resolution of ", paste(newRes, collapse = "x"), "m; ",
messagePreProcess("Using original resolution (", paste(newRes, collapse = "x"), "m) ",
verbose = verbose
)
projectTo <- terra::rast(projectTo, resolution = newRes)
} else {
projectTo <- terra::crs(projectTo)
}

messagePreProcess("in the projection of `projectTo`, using the origin and extent",
messagePreProcess("Using the origin and extent from `ext(from)` in the projection from `crs(projectTo)`.",
verbose = verbose
)
messagePreProcess("from `ext(from)` (in the projection from `projectTo`).",
verbose = verbose
)
messagePreProcess("If this is not correct, create a template gridded object and pass that to projectTo...",
messagePreProcess("If this is not correct, create a template gridded object and pass that to `projectTo`...",
verbose = verbose
)
messagePreProcess("",
Expand Down

0 comments on commit 601a9bc

Please sign in to comment.