Skip to main content
Tilebox indexes Sentinel-2 metadata and public asset locations in the open_data.aws_earth.sentinel2 dataset. In this guide, you query a cloud-free scene over Sandwich Harbour in Namibia, read a small window from its red, green, and blue Cloud Optimized GeoTIFFs (COGs), and combine the bands into an RGB image.
Asset collections and the storage client are currently available in the Python SDK.

Prerequisites

Select a cloud-free scene

Define a small area around Sandwich Harbour and query Sentinel-2 Level-2A scenes from June 17, 2024. Select the result with the least cloud cover.
Python
See Query open data metadata for broader temporal, spatial, and field-filtering patterns.

Resolve the RGB assets

Convert the datapoint into an asset collection:
Python

Read and combine the bands

Open the three COGs and read only the window that covers the area of interest. The bands share the same pixel grid, so you can fetch them concurrently and stack them directly.
Python
The asset metadata supplies the scale and offset that convert stored pixel values to surface reflectance.

Render the RGB image

Apply a display stretch, gamma correction, and a small contrast clip, then save the array as a PNG:
Python
ImageOps.autocontrast is only intended for visualization. Keep the original reflectance values when calculating indices or running quantitative analysis.
Cloud-free Sentinel-2 RGB image of Sandwich Harbour and the Namib dune coast

Next steps

Create a Sentinel-1 radar image

Render an all-weather SAR observation over Venice.

Read and download assets

Learn about streaming, downloads, GeoTIFF access, and location selection.