Skip to main content

stactools-modis

This repository will assist you in the generation of STAC files for MODIS datasets.

Examples

There is an example Catalog at examples/catalog.json. Inside that catalog are several MODIS v6.0 and v6.1 STAC Collections and Items.

Command-line Usage

To create a STAC Item:

$ stac modis create-item tests/data-files/MCD12Q1.A2001001.h00v08.006.2018142182903.hdf.xml build

To create a STAC Catalog from a list of MODIS asset hrefs:

$ stac modis create-catalog examples/file-list-061.txt examples/modis-061

Contributing

If you are making any changes to the item or collection structure, the tests will fail until you update the expected values. To update, run this script:

$ scripts/create_expected.py

This will create, validate, and save new test data items into tests/data-files/expected which are used for unit testing.

Once you've got a pull request ready, please update the examples as well (you'll need to download the external test data files first, see below):

$ stac modis create-catalog --cogify examples/file-list-061.txt examples/modis-061

Note that this will take a while (~5-10 minutes). If you need to update the examples later, you can omit the --cogify as the COGs will already be created.

Running tests

Because of the large number of MODIS products supported by this library and their asset file size, the default test suite does not download all HDF files. To run all tests, use the --runslow option for pytest:

pytest --runslow

This will download HDF files for all 061 products to tests/data-files/external. Note that these files are required to create the examples/ directory.

Metadata

Release files for stactools-modis 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stactools-modis 0.2.0
File Size Uploaded
stactools-modis-0.2.0.tar.gz 42.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stactools-modis 0.2.0
File Interpreter ABI Platform
stactools_modis-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 136.2 kB

Release files / stactools-modis-0.2.0.tar.gz

Download URL stactools-modis-0.2.0.tar.gz
Size 42.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9f7d07f961507d12deac5691f3286d743efb5c422dfd3312caf6a47a73d28f18
BLAKE2b-256 checksum
How to use checksums
4299a2a199e74a1ef3c69139360cb12b21d9ddb08439c515babd0220c8df8769
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release files / stactools_modis-0.2.0-py3-none-any.whl

Download URL stactools_modis-0.2.0-py3-none-any.whl
Size 94.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49559e74cf7f26423f70847d19bfd0172e742c4b26975469b9a8391edd045b2e
BLAKE2b-256 checksum
How to use checksums
1cf5b0f2dfb0935d9e87e05e7808b4baab69b36dc7544d88cde8c31d544346b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page