Query Sentinel-2 satellite imagery metadata from a Tilebox dataset, filtering results by geographic area and time range to find exactly the data you need.
The output shows that the query returned 169 data points metadata. The metadata is returned as an xarray.Dataset.Now you can check the metadata and decide which data points you want to download.
Tilebox stores and indexes metadata about datasets but doesn’t store the data files.
Sentinel-2 data is stored in the Copernicus Data Space Ecosystem (CDSE). If you never used the CDSE before, create an account and then generate S3 credentials here.
Copy
Ask AI
from tilebox.storage import CopernicusStorageClientstorage_client = CopernicusStorageClient( access_key="YOUR_ACCESS_KEY", secret_access_key="YOUR_SECRET_ACCESS_KEY",)for _, datapoint in data.groupby("time"): downloaded_data = storage_client.download(datapoint) print(f"Downloaded data to {downloaded_data}")
This code will download all 169 data points to a cache folder. Now you can work with the data, visualize it, and run your custom processor on it.