appelmar / gdalcubes_cpp

Earth observation data cubes from GDAL image collections
MIT License
74 stars 7 forks source link

Plot RGB don't work #39

Open pobsteta opened 3 years ago

pobsteta commented 3 years ago

Hi,

I have donwloading this tile : "SENTINEL2B_20210110-105806-431_L2A_T31TEM_D.zip" on theia muscate. i create a db with this file : tile <- "SENTINEL2B_20210110-105806-431_L2A_T31TEM_D" img_mensuel_col <- gdalcubes::create_image_collection(paste0("/media/obstetar/Seagate Expansion Drive/shiny_cnes/data/", tile, ".zip"), "Sentinel2_L2A_THEIA", "/home/obstetar/Bureau/image_collection.db", unroll_archives = TRUE )

vuem <- gdalcubes::cube_view( srs = "EPSG:2154", extent = list( left = 797972.4, right = 833590.6, top = 6621103.5, bottom = 6562586.2, t0 = strftime(as.Date(str_sub(tile, 12, 19), format = "%Y%m%d"), format = "%Y-%m-%d"), t1 = strftime(as.Date(str_sub(tile, 12, 19), format = "%Y%m%d"), format = "%Y-%m-%d") ), dx = 100, dt = "P1D", resampling = "bilinear", aggregation = "median", keep.asp = TRUE )

s_rgb_preview <- gdalcubes::raster_cube(img_mensuel_col, vuem) %>% gdalcubes::select_bands(c("B2", "B3", "B4")) %>% plot(rgb = 3:1)

All the plot is gray no color ??? Or with tile SENTINEL2B_20210226-104809-432_L2A_T31TEM_D.zip no problem @+