Skip to content

Simple python module to read Sentinel 2 metadata from SAFE

License

Notifications You must be signed in to change notification settings

ungarj/s2reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Simple python module to read Sentinel 2 metadata from SAFE

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •