We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently the coltab is dropped when a raster is wrapped. this could be fixed by adding to finalizeWrap
r@attributes$coltab = coltab(r)
and in the unwrap method ext(rr) <- r@attributes$coltab
The text was updated successfully, but these errors were encountered:
352cc8d
Thanks very much, I overlooked that. I now get:
library(terra) s <- r <- rast(ncols=3, nrows=2, vals=1:6) coltab(r) <- data.frame(value=1:6, col=rainbow(6, end=.9)) rast(wrap(r)) #class : SpatRaster #dimensions : 2, 3, 1 (nrow, ncol, nlyr) #resolution : 120, 90 (x, y) #extent : -180, 180, -90, 90 (xmin, xmax, ymin, ymax) #coord. ref. : lon/lat WGS 84 #source(s) : memory #color table : 1 #name : lyr.1 #min value : 1 #max value : 6
Sorry, something went wrong.
No branches or pull requests
Currently the coltab is dropped when a raster is wrapped.
this could be fixed by adding to finalizeWrap
r@attributes$coltab = coltab(r)
and in the unwrap method
ext(rr) <- r@attributes$coltab
The text was updated successfully, but these errors were encountered: