Is there a library for navigating Sentinel's SAFE product and tile archives (i. e. a nice object-oriented API for reading metadata, getting tiles, reading imagery files)

As far as I understand, sentinelsat only has utilities for searching and downloading the data. Sentinelhub has some code related to the structure of the SAFE format, but it is tailored to build SAFE archives from the AWS files and not general operations with SAFE.

Reading SAFE archives for analysis seems to be a common task, so just wanted to check that no available library exists before writing my own set of classes.

1 Answer 1


Sentinelhub Python package actually does support some reading from .SAFE structure. The data can either be downloaded from AWS or read from your local files. You can specify which bands and metadata you would like to read and for which tile and product. Example:

from sentinelhub import AwsProductRequest

request = AwsProductRequest(data_folder='./MyData', product_id='S2A_MSIL1C_20171010T003621_N0205_R002_T01WCV_20171010T003615',
                            tile_list=['T01WCV'], bands=['B01', 'B10'],
                            metafiles=['metadata', 'preview/B02', 'qi/MSK_CLOUDS_B00'], safe_format=True)
data = request.get_data(save_data=False)  # returns a list of obtained data
filename_list = request.get_filename_list()  # returns a list of requested file locations in the same order as obtained data

There is also a documentation page.

The package is free and open source. If you find this useful you are welcome to contribute to the project on Github (raise issues, pull requests, ...). This part of the package could be improved or extended to support any more advanced .SAFE data manipulations.

Disclamer: I partially wrote the Sentinelhub package and I work for Sinergise.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.