Skip to content

stactools-packages/nalcms

Repository files navigation

Binder

stactools-nalcms

This package is intended to help describe the North American Land Change Monitoring System (NALCMS) data hosted by the Commission for Environmental Cooperation (CEC) as STAC.

Usage

  1. As a Python module
from stactools.nalcms import stac
from stactools.nalcms.constants import PERIODS, GSDS, REGIONS, YEARS
import os
import itertools as it

# Create the STAC
root_col = stac.create_nalcms_collection()

for per, years in PERIODS.items():
    combos = it.product(REGIONS.keys(), GSDS, years)
    period = stac.create_period_collection(per)
    root_col.add_child(period)

    for reg, gsd, year in combos:
        item = stac.create_item(reg, gsd, year, "")
        if item is not None:
            period.add_item(item)

# Create a specific STAC Item
item = stac.create_item("CAN", "30", "2010", source="path/to/cog.tif")
  1. Using the CLI
scripts/stac nalcms create-collection -d ./examples/

scripts/stac nalcms create-item -d ./examples/

scripts/stac nalcms create-cog -s ./examples/image.tif -d ./examples/

Use scripts/stac nalcms --help to see all subcommands and options.

About

stactools package for the North American Land Change Monitoring System

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published