stactools-global-mangrove-watch
March 28, 2025 ยท View on GitHub
- Name: global-mangrove-watch
- Package:
stactools.global_mangrove_watch - stactools-global-mangrove-watch on PyPI
- Owner: @hrodmn
- Dataset homepage
- STAC extensions used:
- Browse the example in human-readable form
- Browse a notebook demonstrating the example item and collection
This package can be used to generate STAC metadata for the Global Mangrove Watch Dataset.
Details
- It is assumed that the raw files have been downloaded from the source and unzipped in a persistent storage location in order to provide proper
hrefsfor the STAC assets. - Each item represents a particular year (1996, 2007, 2008, etc) with assets for the annual mangrove mask raster (
cog) and the 1996-{year}change raster (change_cog).- The vector files are not yet added as assets
STAC examples
Installation
pip install stactools-global-mangrove-watch
Command-line usage
Create a collection json:
stac globalmangrovewatch create-collection {destination}
Create an item json:
stac globalmangrovewatch create-item {cog_asset_href} {destination}
Create an item json with the change asset added
stac globalmangrovewatch create-item {cog_asset_href} {destination} --change-asset-href {change_asset_href}
Use stac globalmangrovewatch --help to see all subcommands and options.
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 -vv
If you've updated the STAC metadata output, update the examples:
uv run scripts/update-examples