Skip to main content

Working with Sentinel-2

Using an AI agent?

Copy this file and pass it to your AI agent to work with Sentinel-2 data. Or paste this prompt to get a canvas:

Make sure the Fused CLI is installed. Read https://docs.fused.io/skills/SENTINEL2.md and https://github.com/fusedio/skills. Then create a Workbench canvas named Sentinel2_Iowa_NDVI for [-93.25, 41.95, -93.15, 42.02] that charts monthly 2024 NDVI and maps the July 2024 NDVI composite. Push it and give me its URL.

Sentinel-2 is a constellation of Copernicus satellites that image the whole Earth every few days at up to 10 m per pixel. Fused serves its L2A surface reflectance through fused.catalog.imagery: one call returns cloud-masked composites, per-polygon statistics or H3 cells for any area and dates, with no scenes to search and no files to download first.

To see what you can build with it, open the canvases in the Sentinel-2 Gallery.

Read an area​

Pass the collection, an area and dates. With composite and reducer, the scenes of each period become one cloud-free value per cell:

@fused.udf
def udf(bounds: fused.types.Bounds = [-93.25, 41.95, -93.15, 42.02]):
df = fused.catalog.imagery(
"sentinel-2-l2a",
bounds,
time="2024-06/2024-07",
bands=["B04", "B08"],
mask_clouds=True,
composite="month",
reducer="median",
h3_res=10,
)
df["ndvi"] = (df["B08"] - df["B04"]) / (df["B08"] + df["B04"])
return df

This returns one row per H3 cell and month with the red (B04) and near-infrared (B08) bands and their NDVI. Any index is plain arithmetic on the band columns.

  • time takes a year ("2024"), a month ("2024-07"), a day, or a "start/end" range.
  • mask_clouds=True drops the pixels the scene classification (SCL) marks as cloud, cloud shadow or thin cirrus.
  • composite is "day", "weekly", "biweekly", "month", "year" or "all", and reducer is "median", "mean", "min", "max", "first" or "last".

Choose the output​

The output argument sets the shape of the result:

outputOne row perUse it for
"hex" (default)H3 cell and scene, or cell and period with compositeMaps, and joins on hex to any other H3 dataset. h3_res sets the cell size.
"chip"Scene, or period with compositeImages and GeoTIFFs. Each band is the pixels of the area as bytes, with h, w, crs and geotransform to rebuild the array.
"stats"PolygonTime series. Each band's statistics (stats: "mean", "std", "min", "max") over the polygon's pixels, as lists in date order.

Statistics per polygon​

Pass a GeoDataFrame, such as field boundaries, to get a time series per polygon. The result keeps each row's own columns:

@fused.udf
def udf():
import geopandas as gpd
import shapely

fields = gpd.GeoDataFrame(
{"field": ["north", "south"]},
geometry=[
shapely.box(-93.22, 41.99, -93.21, 42.00),
shapely.box(-93.20, 41.97, -93.19, 41.98),
],
crs=4326,
)
return fused.catalog.imagery(
"sentinel-2-l2a",
fields,
time="2024-04/2024-07",
bands=["B04", "B08"],
output="stats",
stats=["mean"],
)

Each field gets its dates and B04_mean and B08_mean lists. One call takes up to 4,096 polygons.

Collections and dates​

fused.catalog.list() lists every imagery collection with its bands and dates. sentinel-2-l2a has bands B01 to B09, B11, B12, B8A, SCL, AOT, WVP and visual_b1 to visual_b3, from July 2015 to the end of 2025. For 2026, hls2-s30 serves Sentinel-2 harmonized with Landsat at 30 m.

Contains modified Copernicus Sentinel data.