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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file stactools-esa-cci-lc-0.1.0.tar.gz.

File metadata

  • Download URL: stactools-esa-cci-lc-0.1.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for stactools-esa-cci-lc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d0b6bd41f26703177eaf7fa3f9ee21548bf397fc53c9e1a000121bf29758c237
MD5 a829321dae43a08116569dc9824076ce
BLAKE2b-256 ea010ef290be95522baf6dc5edc5911f511f18774b3876523a0b87e029c7cbeb

See more details on using hashes here.

File details

Details for the file stactools_esa_cci_lc-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stactools_esa_cci_lc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da37530cccaf9e9d1a717917e47b5488a07ea29b258b42943f84527749b1e7df
MD5 336e4097751950d22f68a1f5e756df94
BLAKE2b-256 c14f3831d676d5323ca774a2ac5dbf4545bd26d56774bdce75bff783093b1d9d

See more details on using hashes here.

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