Skip to content

USGS Land Change Monitoring, Assesment, and Projection (LCMAP) stactools package

License

Notifications You must be signed in to change notification settings

stactools-packages/usgs-lcmap

Repository files navigation

stactools-usgs-lcmap

PyPI

Summary

The Land Change Monitoring, Assessment, and Projection (LCMAP) project provides an integrated suite of annual land cover and land surface change products for the conterminous United States and Hawaii based on time series data from the Landsat record. LCMAP Science Products are based on the USGS implementation of the Continuous Change Detection and Classification (CCDC) algorithm.

This stactools package provides tooling for creating STAC Collections and Items for USGS LCMAP products that are tiled to match Landsat ARD tiles. An LCMAP tile consists of a TAR archive and an XML metadata file. The TAR archive contains COGs and XML files for the 10 LCMAP products, a "browse" COG, and a text file containing Landsat observation dates used as input to the CCDC algorithm.

Creating a STAC Item will cause the TAR archive contents to be extracted to a new directory that sits alongside the TAR archive and XML metadata file, or expects this extraction to already have been performed. Note that the STAC Items do not simply describe the COGs in their extracted form. The COGs are reprocessed to correct the projection (WGS84 spheroid parameters), add nodata values to some of the COGs, and add overviews. This extraction and reprocessing can be turned off, but will result in a STAC Item that does not correctly describe the data, unless the TAR archive was previously extracted and the COGs reprocessed.

STAC Examples

The example Collections and Items in the examples directory can be created by running ./scripts/create_examples.py.

Installation

pip install git+https://github.com/stactools-packages/usgs-lcmap

Command-line Usage

To create a collection:

stac usgs-lcmap create-collection <CONUS|Hawaii> collection.json

To create an Item:

stac usgs-lcmap create-item <path-to-tar> item.json

Use stac usgs-lcmap --help to see all subcommands and options.

Contributing

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

pip install -e .
pip install -r requirements-dev.txt
pre-commit install

To check all files:

pre-commit run --all-files

To run the tests:

pytest -vv

About

USGS Land Change Monitoring, Assesment, and Projection (LCMAP) stactools package

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published