Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support SpatRaster #6

Merged
merged 1 commit into from
Jan 3, 2025
Merged

support SpatRaster #6

merged 1 commit into from
Jan 3, 2025

Conversation

rhijmans
Copy link
Contributor

@rhijmans rhijmans commented Jan 2, 2025

With these changes you can run the example in help(slideView) with SpatRasters

slideView(terra::rast(img2000), terra::rast(img2013), label1 = "before", label2 = "after")

I would suggest replacing the Raster* methods with a single method

setMethod("slideView", signature(img1 = "Raster", img2 = "Raster"),
          function(img1,  img2, ...) {
                 slideView(terra::rast(img1), terra::rast(img2), ...)
          }
)

and explain that some arguments are only relevant when there is 1 layer

@tim-salabim tim-salabim merged commit 259c23d into r-spatial:master Jan 3, 2025
1 of 5 checks passed
@tim-salabim
Copy link
Member

Thanks @rhijmans! A method switch from raster to terra is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants