I would like to batch process Sentinel-1 images in Python.

Previously I have used SNAP (Sentinel-1 Toolbox) to apply Calibration, Multilooks, Speckle Filters, Terrain Correction and then export as a GeoTiff, using 'Batch Processing'. This is reasonably good, but quite clunky, and can take a long time if there are a large amount of images.

To speed the process up, I have started using the sentinelsat API to batch download Sentinel-1, as opposed to individually downloading imagery from the Sci-hub. Therefore, it would be helpful if i was able to batch process these images without having to load them all into SNAP .

My question is: Is there a pythonic way to read the manifest.safe files from the zipped Sentinel-1 folders and apply pre-processing parameters (I.e. Calibration, Multilooking, Terrain Correction etc etc) and exporting as a Geotiff using Open Sourced Python libraries?

  • When using the Terrain-Correction tool it will attempt to download the corresponding SRTM 3Sec DEM tile for your product. If it's timing out during this download you can manually download the DEM tile zip file and put it in your snap user folder /.snap/auxdata/dem/SRTM 3Sec. Tiles can be downloaded from dwtkns.com/srtm – Ali Jun 24 '19 at 8:44
  • Have you looked into pyroSAR? It's an open source SAR processing package for python that uses tools from SNAP and GAMMA. github.com/johntruckenbrodt/pyroSAR – David B Dec 5 '19 at 21:38

ESA's SNAP software does have a Python API which you can set up by following these instructions.

Additionally, in your SNAP bin directory you'll find the Graph Processing Tool executable. This provides a command line interface to the operators available in the SNAP GUI. Further, you can create your own graphs depending on your workflow and specify your parameters.

You can then run the GPT from python via the subprocess module:

import subprocess as sp

gpt = r'your_gpt_path' # If it is in your PATH environment variable you can just use 'gpt'
graph_path = r'your_graph.xml'

cmd_pts = [gpt,


This tutorial gives an intro to using GPT. For a demonstration of usage including creating your own graphs and bash scripts for batch processing see this recorded webinar.

| improve this answer | |
  • Partly. The GPT command line interface is useful, though i cannot terrain correct my Sentinel-1 products due to a time-out error. Has this ever occurred for you? Initially i thought it was a proxy issue, but this is not the case. It may be worth me posting another question for this particular issue – Rhodri_22 Jun 24 '19 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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