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.6.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ae2b255f83be15dd3d06ddbeb54f405933154557d39567a8689c0a643529f59 |
|
MD5 | a1fe17905d3e3647b34e3b270bc4e13f |
|
BLAKE2b-256 | 21b4c9002cf4b04aeea3e7542d336f55541af121aa2722d535c831948669cc75 |
Hashes for stactools_sentinel2-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7f0da7be9aebc0f7f157e589eed34f9dcc7b48b119e058d502fe2a216e6f900 |
|
MD5 | 82d7d701660d3dfd1ab02e0185c36c40 |
|
BLAKE2b-256 | 95a6c37eda212f1163d8e8b4d9910b978a2f43a92610a9b296f0ef843da01722 |