Satellite Products Metadata Parser
Project description
spmp
![DOI](https://pypi-camo.freetls.fastly.net/e775c2e6f1717f75371839e4aee92e8488a2737d/68747470733a2f2f7a656e6f646f2e6f72672f62616467652f444f492f31302e353238312f7a656e6f646f2e383131343935302e737667)
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)
Built Distribution
spmp-0.2.3-py3-none-any.whl
(32.0 kB
view hashes)