Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

earth and related environmental sciences

STAC-Based Exploration and Visualization of Sentinel-2 and Sentinel-1 Data

Learn how to access Sentinel-2 and Sentinel-1 images via the EOPF STAC Catalog using pystac-client

Authors
Affiliations
Eurac Research
Eurac Research
ESA EOPF Zarr Logo

🚀 Launch in JupyterHub

Run this notebook interactively with all dependencies pre-installed

Introduction

This notebook provides a comprehensive walkthrough for accessing, filtering, and visualizing Sentinel-1 and Sentinel-2 satellite imagery using a STAC (SpatioTemporal Asset Catalog) interface. Leveraging the pystac-client, xarray, and matplotlib libraries, the notebook demonstrates how to:

  1. Connect to a public EOPF STAC catalog hosted at https://stac.core.eopf.eodc.eu.

  2. Perform structured searches across Sentinel-2 L2A and Sentinel-1 GRD collections, filtering by spatial extent, date range, cloud cover, and orbit characteristics.

  3. Retrieve and load data assets directly into xarray for interactive analysis.

  4. Visualize Sentinel-2 RGB composites along with pixel-level cloud coverage masks.

  5. Render Sentinel-1 backscatter data (e.g., VH polarization) for selected acquisitions.

Setup

Start importing the necessary libraries

STAC Collection Discovery

Using CollectionSearch to list available STAC collections

sentinel-2-l2a
sentinel-3-olci-l2-lfr
sentinel-3-slstr-l2-lst
sentinel-1-l2-ocn
sentinel-1-l1-grd
sentinel-2-l1c
sentinel-1-l1-slc
sentinel-3-slstr-l1-rbt
sentinel-3-olci-l1-efr
sentinel-3-olci-l1-err
sentinel-3-olci-l2-lrr

Sentinel-2 Item Search

Querying the Sentinel-2 L2A collection by bounding box, date range, and cloud cover

[<Item id=S2B_MSIL2A_20250430T101559_N0511_R065_T32TLQ_20250430T131328>, <Item id=S2C_MSIL2A_20250425T102041_N0511_R065_T32TLQ_20250425T155812>, <Item id=S2C_MSIL2A_20250418T103041_N0511_R108_T32TLQ_20250418T160655>, <Item id=S2C_MSIL2A_20250405T102041_N0511_R065_T32TLQ_20250405T175414>]

Quicklook Visualization for Sentinel-2

We can use the RGB quicklook layer contained in the Sentinel-2 EOPF Zarr product for a visualization of the content:

<Figure size 640x480 with 1 Axes>

We can view side by side the RGB quicklook and the SCL (Scene Classification Layer) for all the returned STAC Items:

/tmp/ipykernel_2583155/2474849155.py:126: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  plt.tight_layout()
<Figure size 1400x2400 with 13 Axes>

Sentinel-1 GRD Item Search

Querying Sentinel-1 L1 GRD collection given bounding box, orbit direction and orbit track number.

[<Item id=S1A_IW_GRDH_1SDV_20250913T161934_20250913T161959_060971_079880_E055>, <Item id=S1A_IW_GRDH_1SDV_20250913T161905_20250913T161934_060971_079880_AB93>]

Sentinel-1 GRD Visualization

Opening the first STAC Item and plot the VH polarization

<Figure size 640x480 with 1 Axes>

The Sentinel-1 visualization is off due to the EOPF CPM version used for the data conversion. The data must be converted with eopf >= 2.6.1.

v256