Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 1.88 KB

README.md

File metadata and controls

34 lines (27 loc) · 1.88 KB

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)