Can I use gdalcubes for dataset XYZ?

Most likely, not out of the box! gdalcubes comes with a few predefined image collection formats for Sentinel-2, Landsat, MODIS, and a few other datasets only. You will need to write a custom image collection format (see here). Please share your collection formats via a pull request on the GitHub collection format respository.

How to contribute?

Contributions of any kind (whether fixing typos, improving documentation, reporting bugs, asking questions, or implementing new features) are very welcome. Please use issues and pull requests on GitHub.

What are the differences to the terra and raster packages?

The main difference is that both terra (Hijmans 2022) and raster (Hijmans 2019) support three dimensions only. To work with 4d (multitemporal and multitemporal) cubes, one needs to use custom data structures like lists of raster stacks or similar. Furthermore, gdalcubes can work automatically with image collections, where images have different spatial extents and projections.

Why is a data cube completely empty?

There are two frequent cases when a data cube is completely empty:

1. There is no image intersecting with the data cube.

Please check the data cube view and the extent of the collection. Make sure that the pixel size is set in the unit of the coordinate reference system (degrees, not meters for EPSG:4326).

2. GDAL could not to read any image file.

Please set gdalcubes_options(debug = TRUE) and repeat the operations. This might be related to modified paths, unavailability of servers, or authentication issuess on cloud platforms.

What are the differences to the stars package?

The stars package (Pebesma 2019) is very generic, supporting arrays with arbitrary dimensions and even irregular spatial (curvilinear) grids. However, stars assumes that the data is already in array format, and hence does not work easily with image collections, , where images have different spatial extents and projections. gdalcubes also works with very large cubes, processing only smaller chunks of the cube at a time.

Where can I report bugs, ask questions, and request features?

Please use the GitHub respository and post issues if you have any questions, found bugs or would like to propose some new features.

How do I cite gdalcubes?

Please refer to our paper at https://doi.org/10.3390/data4030092. You can use the corresponding BibTeX entry:

        AUTHOR = {Appel, Marius and Pebesma, Edzer},
        TITLE = {On-Demand Processing of Data Cubes from Satellite Image Collections with the gdalcubes Library},
        JOURNAL = {Data},
        VOLUME = {4},
        YEAR = {2019},
        NUMBER = {3},
        ARTICLE-NUMBER = {92},
        URL = {https://www.mdpi.com/2306-5729/4/3/92},
        ISSN = {2306-5729},
        DOI = {10.3390/data4030092}

Where is the C++ library repository?

Since gdalcubes version 0.6.4, the C++ library has been completely integrated into the R package source tree (under src/gdalcubes). There is no separate repository anymore and the URL https://github.com/appelmar/gdalcubes now points to the R package repository (including the C++ library).


Hijmans, Robert J. 2019. Raster: Geographic Data Analysis and Modeling. https://CRAN.R-project.org/package=raster.
———. 2022. Terra: Spatial Data Analysis. https://CRAN.R-project.org/package=terra.
Pebesma, Edzer. 2019. Stars: Spatiotemporal Arrays, Raster and Vector Data Cubes. https://CRAN.R-project.org/package=stars.