Skip to content

Repository files navigation

icesat2-boreal-stac

GitHub Workflow Status (with event)

A short description of the package and its usage.

STAC examples

Aboveground biomass

Vegetation height

Installation

pip install git+https://github.com/MAAP-project/icesat2-boreal-stac.git@main

Usage

Warning

By default, this package will create STAC v1.1.0 collections and items!

Use pystac.set_stac_version or the PYSTAC_STAC_VERSION_OVERRIDE environment variable to set it to version 1.0.0 if you need that for your catalog.

To create collections:

from pystac import set_stac_version
from icesat2_boreal_stac.stac import create_collection, Variable

# optional: set STAC version to 1.0.0
# set_stac_version("1.0.0")

agb_collection = create_collection(Variable.AGB)
ht_collection = create_collection(Variable.HT)

To create items, specify the key to the COG and training data parquet assets for this item.

Note

You need to be authenticated with MAAP SMCE AWS credentials to access the files in these buckets:

from icesat2_boreal_stac.stac import create_item

agb_item = create_item(
    cog_key="s3://maap-ops-workspace/aliz237/dps_output/run_boreal_biomass_map/v3.1.0/AGB_H30_2020/full_run/2025/08/19/09/59/01/262274/boreal_agb_2020_202508191755618683_0036023.tif",
    parquet_key="s3://maap-ops-workspace/aliz237/dps_output/run_boreal_biomass_map/v3.1.0/AGB_H30_2020/full_run/2025/08/19/09/59/01/262274/boreal_agb_2020_202508191755618683_0036023_train.parquet",
)
ht_item = create_item(
    cog_key="s3://maap-ops-workspace/aliz237/dps_output/run_boreal_biomass_map/v3.1.0/Ht_H30_2020/full_run/2025/08/20/14/01/56/204100/boreal_ht_2020_202508201755722400_0003543.tif",
    parquet_key="s3://maap-ops-workspace/aliz237/dps_output/run_boreal_biomass_map/v3.1.0/Ht_H30_2020/full_run/2025/08/20/14/01/56/204100/boreal_ht_2020_202508201755722400_0003543_train.parquet",
)

Contributing

We use pre-commit to check any changes. To set up your development environment:

uv sync
uv run pre-commit install

To check all files:

uv run pre-commit run --all-files

To run the tests:

uv run pytest

If you've updated the STAC metadata output, update the examples:

Note

You need to be authenticated with MAAP SMCE credentials to run this

uv run scripts/update-examples

About

Small python module to create STAC items from icesat2-boreal MAAP work

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages