fetch.fetch_sentinel_data
fetch.fetch_sentinel_data(
mission,
bands,
time_range,
roi,
resolution=10,
save_folder='data',
max_cloud_coverage=0.1,
min_cloud_coverage=0.0,
provider='auto',
config=None,
grid=None,
)Fetch imagery for any supported mission and provider.
Returns (data, final_bands) where data is a list of numpy arrays (matching SentinelHubRequest.get_data() compatibility) and final_bands is the ordered list of bands actually downloaded.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| mission | str | “Sentinel-2”, “Sentinel-2-L1C”, “Sentinel-1”, or “Landsat”. | required |
| bands | list[str] or None | Logical band names; None uses the mission’s default bands. |
required |
| time_range | (str, str) | ISO date strings (start, end). | required |
| roi | [lon_min, lat_min, lon_max, lat_max] | Bounding box in WGS84. | required |
| resolution | float | Output pixel size in metres. When grid is not supplied, the output CRS is the AOI-centroid UTM zone (deterministic across repeat fetches – see :func:~.plan_grid.plan_grid). |
10 |
| save_folder | str | Where to write <scene_id>/<Mission>_full_size.tiff. |
'data' |
| max_cloud_coverage | float | Scene-level cloud-cover threshold (0-1). | 0.1 |
| provider | str | “auto” (default), “earthsearch”, “planetary_computer”, “planet”, “direct_http”, “earth_engine”, “earthdata”, “kyfromabove”, “local_files”, or “sentinelhub”. | 'auto' |
| config | sentinelhub.SHConfig | Required only when provider="sentinelhub". |
None |
| grid | geoai_datacubes.fetch.plan_grid.Grid | Force the output onto a specific pre-planned grid. Use this for multi-temporal / multi-mission fetches that must share the same raster – build once with plan_grid(roi, resolution) and pass to every call. When None (default), each call plans its own deterministic AOI-centroid grid. Supported by the earthsearch, planetary_computer, and planet providers; the other providers already picked AOI-centroid grids and accept the same argument for API consistency. Not yet supported by sentinelhub. |
None |