All Projects → ungarj → s2reader

ungarj / s2reader

Licence: MIT license
Simple python module to read Sentinel 2 metadata from SAFE

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
XSLT
1337 projects

s2reader

PyPI version Build Status Coverage Status Code Health

Simple python module to read Sentinel 2 metadata from SAFE. In its current version, it is designed to work with Level 1C data.

To get more information on the data format, please be refered to the official Sentinel 2 Product Specification. A brief introduction on the most important termes can be found in the documentation as well.

Example

import s2reader

with s2reader.open("example.SAFE") as s2_product:
    # returns product start time
    print s2_product.product_start_time
    # returns product stop time
    print s2_product.product_stop_time
    # returns product generation time
    print s2_product.generation_time
    # returns product footprint
    print s2_product.footprint
    # iterates through product granules
    for granule in s2_product.granules:
        # returns granule path
        print granule.granule_path
        # returns granule footprint
        print granule.footprint

    # returns list of image paths of a specific band (e.g. all .jp2 files for
    # band 1)
    print s2_product.granule_paths(1)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].