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
File details
Details for the file stactools-sentinel2-0.6.4.tar.gz
.
File metadata
- Download URL: stactools-sentinel2-0.6.4.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f30ee963fcc786b79116d2918e031728e1584bccf119c491c7a6e24b9dc640c |
|
MD5 | ed3bfe31ba19d3ba7d89a9b72573ebfb |
|
BLAKE2b-256 | 3064853291e4157a95ca9a92ee2d54a7d4d2534a0b7dc7efd85009d927f7233c |
File details
Details for the file stactools_sentinel2-0.6.4-py3-none-any.whl
.
File metadata
- Download URL: stactools_sentinel2-0.6.4-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4b26b2eff282e71c82e54bf493063cca79dc13d854720f4454e98b00b26f337 |
|
MD5 | 8a8cd0e3cf864a6c5da187bfd23508a8 |
|
BLAKE2b-256 | 85837436057e9f2435b8ef62d327d03fd1a9c1370f591388106961362ab3233d |