Repository navigation
Migrate from raster to terra and fix CRAN archival failure - #75
Merged
Merged
Conversation
Collaborator
Author
|
I suppose that we this we can resubmit to CRAN, and release a v1.1? |
Robinlovelace
approved these changes
Jun 16, 2026
Robinlovelace
left a comment
Member
There was a problem hiding this comment.
I have one optional recommendation. Good to go though from my perspective, great work @temospena !
| #' @export | ||
| #' @examples | ||
| #' dem_lisbon() | ||
| dem_lisbon <- function() { |
| #' @param ... Additional arguments passed to ceramic::cc_elevation | ||
| #' @param output_format Character string specifying output format ("raster" or "terra") | ||
| #' @return Elevation raster data covering the routes | ||
| #' @param output_format Deprecated. Ignored; always returns a SpatRaster. |
Member
There was a problem hiding this comment.
👍 why not simply remove this though? It's fine to have breaking changes and will mean fewer lines of code if we don't have Deprecated arguments in our packages, so that would be my recommendation here.
Collaborator
Author
There was a problem hiding this comment.
nice catch! I'll remove that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This PR addresses the recent CRAN archival of
slopesby fixing thedonttestissue and simultaneously resolving the long-standing technical debt of migrating away from the deprecatedrasterpackage.This PR supersedes both PR #73 and PR #74, as it includes the CRAN fixes from those PRs alongside a complete migration to
terra.Key Changes:
rastertoterra(Fixes Abandon raster and move to terra #60):rasteris no longer under active development and has been removed fromImports.terrais now the sole raster dependency forslopes.raster::extract(),raster::crs(), andraster::raster()calls withterra::equivalents.Raster*objects are still accepted but emit a helpful message converting them toSpatRaster.terra=andoutput_format=arguments.elevation_add()example that triggeredceramic/Mapbox downloads and caused the CRAN failure is now wrapped in\dontrun{}instead of\donttest{}.dem_lisbon_rastertodem_lisbon(). Sinceterra::SpatRasterobjects contain C++ pointers that invalidate upon.rdaserialization, the dataset is now shipped as a.tifininst/and accessed via the newdem_lisbon()function.Verification:
R CMD check --as-cranpasses with 0 errors, 0 warnings, and 0 notes.Closes / Supersedes: