Create STAC Items from Sentinel-2 metadata
Project description
stactools-sentinel2
stactools package for Sentinel-2 data.
Examples
Running
pip install stactools-sentinel2
SAFE archive:
stac sentinel2 create-item tests/data-files/S2A_MSIL2A_20190212T192651_N0212_R013_T07HFE_20201007T160857.SAFE output/
AWS Open Data bucket sentinel-s2-l2a
:
stac sentinel2 create-item tests/data-files/S2A_OPER_MSI_L2A_TL_SGS__20181231T210250_A018414_T10SDG output/
Sentinel Hub metadata:
stac sentinel2 create-item --asset-href-prefix s3://sentinel-s2-l2a/tiles/34/L/BP/2022/4/1/0/ \
https://roda.sentinel-hub.com/sentinel-s2-l2a/tiles/34/L/BP/2022/4/1/0/ output
Note: this does not currently work with S3 buckets using requester-pays.
The flag --tolerance
can be set to a decimal value to define the simplification tolerance of the Item geometry.
This is a pass-through to the Shapely simplify method.
Development
Install pre-commit hooks with:
pre-commit install
Run these pre-commit hooks with:
pre-commit run --all-files
Install the code in the local python env so your IDE can see it:
pip install -e .
Run the tests with:
pytest -vvv
If you change the STAC metadata output, you will need to re-create the test files with the following command:
python scripts/create_expected.py
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
Hashes for stactools-sentinel2-0.5.0a3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb85c9a0455af84c6bbaf79fc32101edc8b09daae5743781c48eff9d5d0ae5dc |
|
MD5 | 9601da349ff85152599d81287fb1c4a9 |
|
BLAKE2b-256 | 31cf5a037bdbf5e9ac487f46551d88d06e58f0ad0644842302226285d2716b9b |
Hashes for stactools_sentinel2-0.5.0a3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d924ac8b054c6ddb9683654cd7bee1c6e3d2841f1a96c395139bfe5f3467a550 |
|
MD5 | 9ac5869bd2813d4aa07d1b0efe9c6720 |
|
BLAKE2b-256 | a03759e4c1bc8b9a6099370c38e3c9d417eb558c90a38f848a414da48caef2e8 |