Create STAC Items from Sentinel-2 metadata
Project description
stactools-sentinel2
stactools package for Sentinel-2 data.
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-l1c/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.4.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 639f4ec187cdd2321317fc8397fdb3bf07a805f67f746dc9b8842441d573956c |
|
MD5 | 8708bf304967b35e9ce4c9e574f01e45 |
|
BLAKE2b-256 | 79e4bbc7b612769be7f2862b0904abb0e2a60a72bd5d03a474a1a5dc89b65f70 |
Hashes for stactools_sentinel2-0.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f624a99e64d020cd1801c6c835b87242d754489a03df885502bb1961bb71298e |
|
MD5 | a6075b4286013fff38ec47361ef064d0 |
|
BLAKE2b-256 | 12d8545474848649b8ea080f5abb1b6fa0c1fdb24c1b2d1ae13155d5ab0970c1 |