Python libraries for extracting Sentinel-2's metadata from Amazon S3
Project description
This packages includes a few functions that facilitates extraction of Sentinel-2’s metadata from Amazon S3.
Installation
$ pip install sentinel-s3
or
$ python setup.py install
Tests
$ python setup.py test
Example
Generating metadata for a date range
import logging
from datetime import date
from sentinel_s3 import range_metadata
def main():
start_date = date(2016, 2, 1)
end_date = date(2016, 3, 22)
return range_metadata(start_date, end_date, '.', 20)
if __name__ == '__main__':
logger = logging.getLogger('sentinel.meta.s3')
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
formatter = logging.Formatter('%(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)
result = main()
print(result)
Generating metadata for a single product
import logging
from datetime import date
from sentinel_s3 import single_metadata
def main():
product = 'S2A_OPER_PRD_MSIL1C_PDMC_20160311T194734_R031_V20160311T011614_20160311T011614'
return single_metadata(product, '.')
if __name__ == '__main__':
logger = logging.getLogger('sentinel.meta.s3')
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
formatter = logging.Formatter('%(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)
result = main()
print(result)
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
sentinel-s3-0.6.1.tar.gz
(7.4 kB
view details)
File details
Details for the file sentinel-s3-0.6.1.tar.gz
.
File metadata
- Download URL: sentinel-s3-0.6.1.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28e992cc00c66d3beb708eac937a78f42556047913443761c0a1c1f8c5272f97 |
|
MD5 | 563d949abedf9f4d0b7a49a66e0ef902 |
|
BLAKE2b-256 | 1a4f5a4bb277db3f68871b9253e1f443e237d0f2b4c2176e66b66c15497d8208 |