stactools package for MODIS data
Project description
stactools-modis
- Name: modis
- Package: 'stactools.modis'
- PyPI: https://pypi-hypernode.com/project/stactools-modis/
- Owner: @gadomski
- Dataset homepage: https://modis.gsfc.nasa.gov/
- STAC extensions used:
- Extra Fields:
modis:horizontal-tile
modis:vertical-tile
modis:tile-id
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 Collection
s and Item
s.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file stactools-modis-0.2.0.tar.gz
.
File metadata
- Download URL: stactools-modis-0.2.0.tar.gz
- Upload date:
- Size: 42.2 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f7d07f961507d12deac5691f3286d743efb5c422dfd3312caf6a47a73d28f18 |
|
MD5 | b527bf45161d3c38a9e0cad6ccf842f8 |
|
BLAKE2b-256 | 4299a2a199e74a1ef3c69139360cb12b21d9ddb08439c515babd0220c8df8769 |
File details
Details for the file stactools_modis-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: stactools_modis-0.2.0-py3-none-any.whl
- Upload date:
- Size: 94.1 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49559e74cf7f26423f70847d19bfd0172e742c4b26975469b9a8391edd045b2e |
|
MD5 | a6e5f92a3a22583a2fa2f027d26e58e9 |
|
BLAKE2b-256 | 1cf5b0f2dfb0935d9e87e05e7808b4baab69b36dc7544d88cde8c31d544346b0 |