-
Notifications
You must be signed in to change notification settings - Fork 95
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
Spatrasters won't plot #1412
Comments
Maybe it's related to the change in #1088 (comment)? |
Potentially. Do you know how I would be able to force it to read from the actual data instead of the overviews? |
Can you share, if need be privately, an example file? |
In the case below I see significant difference in plotting time: library("terra")
gdal() # "3.7.2"
# Size is 10980, 10980
# Overviews: 5490x5490, 2745x2745, 1373x1373, 687x687
url = "/vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/55/G/DM/2023/12/S2A_55GDM_20231230_0_L2A/B02.tif"
x = terra::rast(url)
system.time(plot(x, maxcell = 10000))
#> user system elapsed
#> 7.09 3.91 50.50
y = stars::read_stars(url, proxy = TRUE)
system.time(plot(y, downsample = 10))
#> user system elapsed
#> 0.42 0.03 3.03 Edit: I tested this on another configuration and it seems that this problem doesn't occur in the old version of GDAL 3.0.4. |
Sorry @rhijmans for bothering you, but could you look into this issue when you find some free time? |
Sorry that it took me so long. I now get
|
Hello,
I'm having issues plotting large cloud optimised geotiffs using terra.
I've just updated R to version 4.3.2 and was previously using 4.0.5.
I didn't have any issues plotting the geotiffs using the old R version.
Now it won't plot and remains processing indefinitely.
This is my code:
library(terra); library(paletteer)
setwd()
r_files = list.files(pattern='.tif', full.names=T)
r = rast(r_files[c(1,5,3,4,6,2)]) # reorder
names(r) = c('0-5 cm', '5-15 cm', '15-30 cm', '30-60 cm','60-100 cm', '100-200 cm')
plot(r, col=paletteer_c('grDevices::Spectral', 30), box=F,
range=c(0,90), axes=F)
plot(r[[1]]) won't even work. Neither will reducing the cells using maxcells.
Any help would be great.
Thanks!
The text was updated successfully, but these errors were encountered: