Skip to main content

Sentinel tile utilities

Project description

sentile

Sentinel tile utilities

The sentile module provides convenient Sentinel tile utility functions.

Usage

Tile name parsing

>>> from sentile.s2 import Tile
>>> tile = Tile("S2A_MSIL2A_20200730T102031_N0214_R065_T33UVU_20200730T110107.SAFE")
>>> tile.name
'T33UVU'
>>> tile.orbit
'R065'

Scene classification mask enum

>>> from sentile.s2 import SCL
>>> SCL.THIN_CIRRUS
10

Path lookup based on band name

>>> from sentile.s2 import Tile, Band10, Band60
>>> tile = Tile("S2A_MSIL2A_20200730T102031_N0214_R065_T33UVU_20200730T110107.SAFE")
>>> tile.get_band(Band10.B04)
PosixPath('S2A_MSIL2A_20200730T102031_N0214_R065_T33UVU_20200730T110107.SAFE/GRANULE/L2A_T33UVU_A026660_20200730T102528/IMG_DATA/R10m/T33UVU_20200730T102031_B04_10m.jp2')
>>> tile.get_band(Band60.SCL)
PosixPath('S2A_MSIL2A_20200730T102031_N0214_R065_T33UVU_20200730T110107.SAFE/GRANULE/L2A_T33UVU_A026660_20200730T102528/IMG_DATA/R60m/T33UVU_20200730T102031_SCL_60m.jp2')

sentile CLI

Sentile's command line interface, named "sentile", has commands for extracting a Sentinel tile's properties.

$ sentile --help

Development

For development

make

make run
$ sentile --help

$ exit
make down

Inside the self-contained reproducible container

flake8 sentile
mypy sentile
pytest

See Also

Inspired by the mercantile module for Web Mercator tiles ❤️

License

Copyright © 2020 robofarm

Distributed under the MIT License (MIT).

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

sentile-1.2.0.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

sentile-1.2.0-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

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