Skip to main content

stactools package for ESA''s Climate Change Initiative (CCI) Land Cover (LC) product

Project description

stactools-esa-cci-lc

PyPI

A stactools package for ESA's Climate Change Initiative (CCI) Land Cover (LC) product.

This dataset provides global maps describing the land surface classes, which have been defined using the United Nations Food and Agriculture Organization's (UN FAO) Land Cover Classification System (LCCS). In addition to the land cover (LC) maps, four quality flags are produced to document the reliability of the classification and change detection. In order to ensure continuity, these land cover maps are consistent with the series of global annual LC maps from the 1990s to 2015 produced by the European Space Agency (ESA) Climate Change Initiative (CCI).

This package can generate STAC files from netCDF files and that either link to the original netCDF files or to Cloud-Optimized GeoTiff (COG) files.

STAC Examples

Installation

pip install stactools-esa-cci-lc

Command-line Usage

Use stac esa-cci-lc --help to see all subcommands and options.

Collection

Create a collection:

stac esa-cci-lc create-collection collection.json

Get information about all options for collection creation:

stac esa-cci-lc create-collection --help

Item

Create an item with netCDF and COG assets:

stac esa-cci-lc create-item /path/to/source/file.nc item.json --collection collection.json

Create an item with only COG assets:

stac esa-cci-lc create-item /path/to/source/file.nc item.json --collection collection.json --nonetcdf TRUE

Get information about all options for item creation:

stac esa-cci-lc create-item --help

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

Tests

Due to the large file sizes, the data files for the tests are missing in this repository. To run the tests, please download the files for 1992, 2015, 2016 and 2020 from the Climate Data Store. You can download them all at once in a ZIP or gzipped TAR file and then extract the .nc files to the tests/data-files/external folder.

The CI doesn't run any tests for item generation due to the missing data files. Please ensure you've tested the changes against the data files locally!

Also, due to the long processing time of the tests with COGs conversion (in total 3-4 hours on my local machine), the tests by default run without COG processing (i.e. --nocog is enabled). To run the tests with COG generation, please run pytest -vv --withcog.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stactools-esa-cci-lc-0.1.0.tar.gz (15.4 kB view hashes)

Uploaded Source

Built Distribution

stactools_esa_cci_lc-0.1.0-py3-none-any.whl (17.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page