Skip to content

Simple python module to read Sentinel 2 metadata from SAFE

License

Notifications You must be signed in to change notification settings

robert-werner/s2reader3

 
 

Repository files navigation

s2reader3

PyPI version Build Status Coverage Status Code Health

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

Derived from old and unsupported Python 2 (https://github.com/ungarj/s2reader)

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 s2reader3

with s2reader3.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))

About

Simple python module to read Sentinel 2 metadata from SAFE

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Python 56.9%
  • HTML 21.5%
  • XSLT 21.1%
  • Shell 0.5%