Skip to main content

Satellite Products Metadata Parser

Project description

spmp LICENSE DOI

WIP Ruff

An easy to use Satellite Product Metadata Parser

Installation

spmp uses only built-in packages.

pip install spmp

Usage

The package can be used both as a module and a cli which invoke the same function.

module

>>> from spmp import parse
>>> product = parse('path/to/LC08_L1TP_187021_20140328_20170424_01_T1.tar.gz')
>>> product
{'program': 'L',
 'sensor': 'C',
 'mission': '08',
 'processing_level': 'L1TP',
 'tile': '187021',
 'sensing_date': '20140328',
 'processing_year': '20170424',
 'collection_number': '01',
 'collection_category': 'T1'
 }

command-line

$ python spmp -p path/to/LC08_L1TP_187021_20140328_20170424_01_T1.tar.gz
{'program': 'L',
 'sensor': 'C',
 'mission': '08',
 'processing_level': 'L1TP',
 'tile': '187021',
 'sensing_date': '20140328',
 'processing_year': '20170424',
 'collection_number': '01',
 'collection_category': 'T1'
 }

It is quite fast so don't worry about it impacting your performance:

 $ python -m timeit -s "from spmp import parse" "parse('path/to/LC08_L1TP_187021_20140328_20170424_01_T1.tar.gz')"
5000000 loops, best of 5: 67.8 nsec per loop

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

spmp-0.2.3.tar.gz (44.1 kB view hashes)

Uploaded Source

Built Distribution

spmp-0.2.3-py3-none-any.whl (32.0 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