Skip to main content

Remote-sensing opensource python library reading optical and SAR constellations, loading and stacking bands, clouds, DEM and spectral indices in a sensor-agnostic way.

Project description

pypi Conda Apache DOI stars Conda

eoreader_logo EOReader

EOReader is a remote-sensing opensource 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.

🛰️ Managed constellations

Optical

Sentinel-2 SAFE and Theia Sentinel-3 OLCI and SLSTR Landsat 1 to 9 Harmonized Landsat-Sentinel PlanetScope, SkySat and RapidEye Pleiades and Pleiades-Neo SPOT-6/7 and 4/5 Vision-1 Maxar (WorldViews, GeoEye) SuperView-1 GEOSAT-2

SAR

Sentinel-1 COSMO-Skymed 1st and 2nd Generation TerraSAR-X, TanDEM-X and PAZ SAR RADARSAT-2 and RADARSAT-Constellation ICEYE SAOCOM Capella

🔮 Features

EOReader implements sensor-agnostic features:

EOReader works mainly with:

⚡️ Quickstart

Optical

EOReader allows you ta load and stack spectral bands, spetrcal 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 in order to make any call to a band generic:
Optical Band Mapping

SAR

In the same way, you can import and stack radar band 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] ⚠️SNAP and SAR

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. If you are using SNAP 8.0, be sure to have your software up-to-date (SNAP version >= 8.0).

📖 Documentation

The API documentation can be found here.

🔗 Examples

Available notebooks provided as examples:

Basics

Advanced

Experimental

🛠 Installation

Pip

You can install EOReader via pip:

pip install eoreader

EOReader mainly relies on geopandas, xarray and rasterio (through rioxarray).

Please look at the rasterio page to learn more about that.

Conda

You can install EOReader via conda:

conda config --env --set channel_priority strict
conda install -c conda-forge eoreader

📚 Context

As one of the Copernicus Emergency Management Service Rapid Mapping and Risk and Recovery Mapping operators, SERTIT needs to deliver geoinformation (such as flood or fire delineation, landslides mapping, etc.) based on multiple EO constellations.

In rapid mapping, it is always important to have access to various sensor types, resolutions, and satellites. Indeed, SAR sensors are able to detect through clouds and during nighttime (which is particularly useful during flood and storm events), while optical sensors benefit from of multi spectral bands to better analyze and classify the crisis information.

As every minute counts in the production of geoinformation in an emergency mode, it seemed crucial to harmonize the ground on which are built our production tools, in order to make them as sensor-agnostic as possible.

This is why SERTIT decided to decouple the sensor handling from the extraction algorithms: the latter should be able to ingest semantic bands (i.e. RED or VV) without worrying about how to load the specific sensor band or in what unit it is.
The assumption was made that all the spectral bands from optical sensors could be mapped between each other, in addition to the natural mapping between SAR bands.

Thus, thanks to EOReader, these tools are made independent to the constellation:
✅ the algorithm (and its developer) can focus on its core tasks (such as extraction) without taking into account the sensor characteristics (how to load a band, which band correspond to which band number, …)
✅ new sensor addition is effortless (if existing in EOReader) and requires no algorithm modification
✅ maintenance is simplified and the code quality is significantly improved
✅ testing is also simplified as the sensor-related parts are tested in EOReader library

However, keep in mind that the support of all the constellations used in CEMS is done in the best effort mode, especially for commercial data. Indeed, we may not have faced every product type, sensor mode or order configuration, so some details may be missing. If this happens to you, do not hesitate to make a PR or write an issue about that!

🎤 Communication

Talks

Press Release

Articles

Blog

📝 License

EOReader is licensed under Apache License v2.0. See LICENSE file for details.

🖋️ Authors

EOReader has been created by ICube-SERTIT.

🤝 Credits

EOReader is built on top of amazing libs, without which it couldn't have been coded:

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eoreader-0.22.2.tar.gz (328.7 kB view details)

Uploaded Source

Built Distribution

eoreader-0.22.2-py3-none-any.whl (355.4 kB view details)

Uploaded Python 3

File details

Details for the file eoreader-0.22.2.tar.gz.

File metadata

  • Download URL: eoreader-0.22.2.tar.gz
  • Upload date:
  • Size: 328.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for eoreader-0.22.2.tar.gz
Algorithm Hash digest
SHA256 4dac9a43fc4da4a022c219e9b9df5c84a61886c9b90e51224d7a11ccf0ed03ae
MD5 e4ecd88eba20431dd9ef9b00b43ce26f
BLAKE2b-256 8b00750346c779a984ce4e27994b7b43b29a0dc938869a8d83ce2d63c7809f30

See more details on using hashes here.

Provenance

The following attestation bundles were made for eoreader-0.22.2.tar.gz:

Publisher: publish.yml on sertit/eoreader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eoreader-0.22.2-py3-none-any.whl.

File metadata

  • Download URL: eoreader-0.22.2-py3-none-any.whl
  • Upload date:
  • Size: 355.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for eoreader-0.22.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6be8e75b1c771456c0f66a8110133cf437716ebe9545a45b9d426f6f2f1f3264
MD5 106f7550e1e81d2af9f3d47aef3b1963
BLAKE2b-256 8103ba5cc6b389e06f11d240e8cfade42aabc93f3a0816ad7d20ea22c36ae819

See more details on using hashes here.

Provenance

The following attestation bundles were made for eoreader-0.22.2-py3-none-any.whl:

Publisher: publish.yml on sertit/eoreader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page