e-sensing / sits

Satellite image time series in R
https://e-sensing.github.io/sitsbook/
GNU General Public License v2.0
473 stars 76 forks source link

sits_cube with local data #1225

Open safalabolo opened 5 days ago

safalabolo commented 5 days ago

Hello!

Describe the requested improvement: I would like to propose an enhancement for the sits_cube function that would make it easier to work with local data sources. Currently, the function allows users to create data cubes from image collections available in various cloud services, as well as from local files. However, the documentation can be confusing, and there might be room for improvements to streamline the process of creating cubes from local datasets.

Specifically, I suggest improving the clarity of the documentation regarding the requirements and parameters for using local data. Additionally, enhancing error messages when files do not conform to expected naming conventions could greatly assist users in troubleshooting.

Associated sits API function: The function in question is sits_cube. It should work as follows when utilizing local data:

The data_dir parameter should clearly specify the directory where images are stored, and it should handle subdirectories if applicable. The parse_info parameter should include detailed examples of expected file name structures for various data types (e.g., MODIS, Landsat, Sentinel). Consider implementing a validation function to check if the local data conforms to the required format before attempting to create the cube. Additional context: Currently, users must ensure that all images have the same spatial resolution and projection and that each file contains a single image band for a single date. Providing more explicit guidance on how to format file names (e.g., including examples of valid and invalid names) would enhance user experience.

Incorporating these improvements would make the sits_cube function more accessible to users who primarily work with local data, thus broadening its usability and appeal.

gilbertocamara commented 1 day ago

Dear @safalabolo many thanks! we will include your suggestions in the documentation and in the book