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

Loading rsat causes terra issue #15

Open
sheilasaia opened this issue Dec 6, 2023 · 0 comments
Open

Loading rsat causes terra issue #15

sheilasaia opened this issue Dec 6, 2023 · 0 comments

Comments

@sheilasaia
Copy link

sheilasaia commented Dec 6, 2023

I wanted to report an issue that I'm having. After I load rsat into my R session, I have issues accessing and working with terra SpatRaster objects.

This code below is running fine without an error

library(terra)
s <- terra::rast(system.file("ex/logo.tif", package="terra"))
terra::subset(s, 2:3)

This code below produces the error: "Error in .local(x, ...) : no slot of name "pnt" for this object of class "SpatRaster".

library(terra)
library(rsat)
s <- terra::rast(system.file("ex/logo.tif", package="terra"))
terra::subset(s, 2:3)

I tested out loading in and rerunning the terra::subset(s, 2:3) line after loading all the the packages that rsat is relying on (see below) and am not getting any errors.

# check individual imports for rsat
library(XML) # ok
library(curl) # ok
library(httr) # ok
library(leafem) # ok
library(leaflet) # ok
library(rjson) # ok
library(rvest) # ok
library(xml2) # ok
library(zip) # ok
library(methods) # ok
library(Rdpack) # ok
library(fields) # ok
library(calendR) # ok
library(testthat) # ok
library(stars) # ok also loads abind
library(knitr) # ok
library(rmarkdown) # ok
library(covr) # ok
library(rgdal) # ok

However after loading rsat using library(rsat), I get the error that I mentioned above. I'm not familiar enough with the package to know if rsat is changing any other variables or settings in the user's current R session or requiring anything that could impact other package versions. If so, I'd recommend removing this feature or somehow making it compatible with terra given the move towards that package announced this past fall.

Thank you for developing this helpful package! Please let me know if I can provide any other information.

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

No branches or pull requests

1 participant