biomassage
biomassage is a Python CLI and package to query, filter, and visualise BIOMASS L1B products from the MAAP STAC catalog.
Overview
BIOMASS is an ESA Earth Explorer mission with a P‑band SAR. This tool helps you:
- Query the MAAP STAC API for BIOMASS L1B Detected Ground Multi‑look (DGM) footprints.
- Filter by temporal range, bounding box, WKT polygon, and sea‑coverage percentage.
- Cache results as GeoPackage (
.gpkg) with sidecar JSON metadata (including the land mask). - Visualise the footprints on a map and generate daily bar charts with mission timeline overlays.
All scripts are designed to be used both interactively and in batch processing.
Installation
Clone the repository and install in development mode:
git clone https://github.com/umr-lops/biomassage.git
cd biomassage
pip install -e .
Note : The package uses
hatchlingas the build backend. Dependencies are listed inpyproject.toml.
Usage
The tool consists of two main scripts.
1. biomass_download.py – Query and filter metadata
python biomass_download.py --outputdir ./my_data --min_sea 10 --start_date 2026-01-01 --end_date 2026-02-15 --bbox "-180 -60 180 60"
--outputdir(required) : directory where all outputs will be stored.--min_sea: keep only footprints with ≥ this percentage of sea (optional).--start_date/--end_date: ISO date range.--bbox: bounding box aswest south east north.--polygon_wkt: alternative polygon in WKT format (cannot be used together with--bbox).-v: verbose logging.
Outputs (in the specified directory):
biomass_l1b_raw_<hash>.gpkg– all footprints that match the spatial/temporal query.biomass_l1b_raw_<hash>.json– user query parameters.biomass_l1b_filtered_<hash>_sea<X>.gpkg– footprints that passed the sea‑percentage filter.biomass_l1b_filtered_<hash>_sea<X>.json– same user parameters plus the simplified land mask geometry (WKT).
The raw GPKG is cached; re‑running the same query will skip the download.
2. biomass_figure_inventory.py – Generate visualisations
python biomass_figure_inventory.py --gdf_all ./my_data/biomass_l1b_raw_...gpkg --gdf_filtered ./my_data/biomass_l1b_filtered_...gpkg --min_sea 10 --output-dir-png ./figures
--gdf_all: path to the raw (unfiltered) GPKG.--gdf_filtered: path to the filtered GPKG.--min_sea: threshold (for legend and title).--output-dir-png: where to save PNG figures (default current directory).--start_date/--end_date: optional annotation; otherwise derived from the data.
Figures:
<filtered_basename>.png– map with footprints (accepted = green, rejected = red) and user polygon/bbox.<filtered_basename>_daily_counts.png– bar chart showing total vs accepted products, with coloured major cycles and dashed vertical lines for sub‑periods (SW1_1, SW2_1, …).
The map uses the land mask geometry stored in the filtered JSON sidecar – no recomputation is needed.
Mission timeline
The plot automatically adds the Tomographic Phase timeline (major cycles and sub‑periods) based on the official BIOMASS mission schedule. Only phases that intersect the date range of your filtered data are displayed.
Dependencies
Main requirements:
geopandas,pandas,numpymatplotlib,cartopyshapely,regionmasktqdm,requestsgeodatasets(for land mask)
See pyproject.toml for the full list.
Contributing
Issues and pull requests are welcome. Please follow the code style (black, isort) and include tests where applicable.
License
This project is licensed under the MIT License – see the LICENSE file for details.
Citation
If you use biomassage in your research, please cite:
@misc{biomassage,
author = {umr-lops},
title = {biomassage – query, filter and visualise BIOMASS L1B products from MAAP},
year = {2026},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/umr-lops/biomassage}}
}
Acknowledgements
This project was initialised with the python-package-template and relies on the ESA MAAP platform and its STAC API.
Metadata
Release files for biomassage 2026.11.24
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| biomassage-2026.11.24.tar.gz | 282.7 kB | With provenance | Details for biomassage-2026.11.24.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| biomassage-2026.11.24-py3-none-any.whl | Python 3 | none | any | Details for biomassage-2026.11.24-py3-none-any.whl |
Total release size: 322.7 kB
Release files / biomassage-2026.11.24.tar.gz
| Download URL | biomassage-2026.11.24.tar.gz |
|---|---|
| Size | 282.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1892604b66e8fc3b77c41ed20b4d2d9f6b576eddc70d0c62e0422104659e2c82
|
|
BLAKE2b-256 checksum How to use checksums |
73026aad58b202f340350ef85bc2bc847278df7585d8c700445b77a5fe9986d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / biomassage-2026.11.24-py3-none-any.whl
| Download URL | biomassage-2026.11.24-py3-none-any.whl |
|---|---|
| Size | 40.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b89887e21a3bc7219dd301072ffc5bb26bd978ac6e1306bfeb4b1c0d76ed72fd
|
|
BLAKE2b-256 checksum How to use checksums |
e51d06939e880ef728b3204a17678be965b18cd389c86c6a5988e44e05b26fec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for biomassage 2026.11.24
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for biomassage-2026.11.24.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.