Skip to main content

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-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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stactools-sentinel2-0.5.0a1.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

stactools_sentinel2-0.5.0a1-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file stactools-sentinel2-0.5.0a1.tar.gz.

File metadata

  • Download URL: stactools-sentinel2-0.5.0a1.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for stactools-sentinel2-0.5.0a1.tar.gz
Algorithm Hash digest
SHA256 8f2751e8857a44938d4ac18b8a5e4231bf8df71e59342901ede1e1727d772cd0
MD5 36197455eef4ef55e0639be24d82acc0
BLAKE2b-256 0699fda98b41b44828ebd7c8fc99045217b81791d804221124fb7b68d8a69d14

See more details on using hashes here.

Provenance

File details

Details for the file stactools_sentinel2-0.5.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for stactools_sentinel2-0.5.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 e333edf4cb379ad13281092cd3089568d4cd59e1474bc50be57d39ba35a72f25
MD5 a29782e97daafd317e0921ffb5ae7a5c
BLAKE2b-256 59982649255133bdc593f3f84c7b13da7ceada71d969c7e245074add22238e0e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page