-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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.