EOReader is a remote-sensing open-source Python library reading optical and SAR constellations, loading and stacking bands, clouds, DEM and spectral indices in a sensor-agnostic way.
Important
๐ก The goal of this library is to manage one satellite product at a time.
To handle more complicated sets of products (such as mosaics, pairs or time series), please consider using EOSets.
EOReader implements sensor-agnostic features:
load: Load many band types:- satellite bands (optical or SAR)
- index
- cloud bands
- DEM bands
stack: Stack all these types of bands
EOReader works mainly with:
xarray.DataArrayandxarray.Datasetfor raster datageopandas.GeoDataFramesfor vector data (extents, footprints...)
EOReader allows you to create internal STAC catalogs directly from raw data.
Note
๐ก EOReader handles data from the past!
Legacy formats are mostly supported and if not, they can be requested by creating an issue with the legacy_format label.
This is super useful if you need to create an internal STAC catalog with old data.
You can install EOReader via pip:
pip install eoreaderEOReader mainly relies on geopandas, xarray and rasterio (through rioxarray).
Please look at the rasterio page to learn more about that.
You can install EOReader via conda:
conda config --env --set channel_priority strict
conda install -c conda-forge eoreader
EOReader allows you to load and stack spectral bands, spectral indices, DEM and cloud bands agnostically from every handled optical constellation:
from eoreader.reader import Reader
from eoreader.bands import RED, GREEN, BLUE, NDVI, CLOUDS
# Sentinel-2 path
s2_path = "S2B_MSIL1C_20181126T022319_N0207_R103_T51PWM_20181126T050025.SAFE"
# Create the reader object and open satellite data
reader = Reader()
# The reader will recognize the constellation from its product structure
s2_prod = reader.open(s2_path)
# Load some bands and index
bands = s2_prod.load([NDVI, GREEN, CLOUDS])
# Create a stack with some bands
stack = s2_prod.stack([RED, GREEN, BLUE], stack_path="s2_rgb_stack.tif")EOReader aligns spectral bands from every handled sensor to make any call to a band generic:
In the same way, you can import and stack radar bands from any handled SAR constellation, with the same pattern.
from eoreader.reader import Reader
from eoreader.bands import VV, VH, VV_DSPK, VH_DSPK
# Sentinel-1 GRD path
s1_path = "S1B_EW_GRDM_1SDH_20200422T080459_20200422T080559_021254_028559_784D.zip"
# Create the reader object and open satellite data
reader = Reader()
# The reader will recognize the constellation from its product structure
s1_prod = reader.open(s1_path)
# Load some bands and index
bands = s1_prod.load([VV, VH])
# Create a stack with some bands
stack = s1_prod.stack([VV_DSPK, VH_DSPK], stack_path="s1_stack.tif")Warning
SAR products need ESA SNAP
free software to be orthorectified and calibrated.
Ensure that you have the folder containing your gpt executable in your PATH.
The API documentation can be found here.
Available notebooks provided as examples:
- Why EOReader?: the motivation behind the library
- Basic tutorial: first steps: open a product, load and stack bands
- Optical data: spectral bands, indices, and cloud bands from optical constellations
- SAR data: radar bands with SNAP orthorectification
- VHR data: very high resolution sensors (Pleiades, WorldView, ...)
- Remove clouds: cloud masking from brightness temperature measurements
- Sentinel-3 data: OLCI and SLSTR band specificities
- Water detection on multiple products: water extraction across several constellations over the same area
- Windowed Reading: read a subset of a product instead of full bands
- DEM: DEM bands (DEM, SLOPE, HILLSHADE) and orthorectification
- Exogenous data: collocate external data onto the product grid
- Custom stacks: read back stacks previously written by EOReader
- Methods to clean optical bands: cleaning methods and their time cost
- AWS storage: read products stored on AWS S3
- S3 Compatible Storage: read products from MinIO or other S3-compatible stores
- Dask: lazy computation with dask-backed arrays
- STAC: create SpatioTemporal Asset Catalog items from products
EOReader was created by SERTIT to support Copernicus Emergency Management Service rapid mapping. See CONTEXT.md for the full story.
- GeoPython 2022 [ PDF ] [ YouTube ]
- Mentioned in [Live+]SIG 2022 by ESRI France (in French):
Enrichir ArcgisPro grรขce ร des processus personnalisรฉs d'observation de la Terre[ PDF ] - Mentioned in GeoPython 2023 -
FLORIA, a custom python pipeline for urban flood extraction from SAR multi-sensors, supported by U-Net convolutional network. - Mentioned in EGU 2023 -
Cutting-edge developments in rapid mapping - FOSS4G 2023 [ PDF ] [ YouTube ]
- ESA Success Story
- Used to extract water for assessing agriculture impacts after the Kakhovka Dam Collapse (cross-post from NASA Harvest and Planet)
- Introduction to EOReader
- EOReader: Remote sensing open-source python library
- The collapse of the Kakhovka dam seen from satellite imagery
EOReader welcomes contributions, human-written or carefully reviewed AI-assisted:
- Humans: CONTRIBUTING.md: quick start, test suite, PR conventions
- Coding agents: AGENTS.md: hard limits, task navigation, verification & self-review
- Technical reference: ARCHITECTURE.md: architecture, modules, build & test, pitfalls
- AI-assisted contribution policy: AI_POLICY.md
- Task templates with AI-risk warnings: .github/templates/
EOReader is licensed under Apache License v2.0. See LICENSE file for details.
EOReader has been created by ICube-SERTIT.
EOReader is built on top of amazing libs, without which it couldn't have been coded:


