Hello everyone ! This is a quick Python code which I wrote to batch download and preprocess Sentinel-1 images of a given time. Sentinel images have very good resolution and makes it obvious that they are huge in size. Since I didn’t want to waste all day preparing them for my research, I decided to write this code which runs all night and gives a nice image-set in following morning.

Since you decided to read more of this topic, I believe you already have a username and password to access Copernicus Open Access Hub and download images. If not, go ahead and grab a free account. The Hub lets us download images with their API, but only two image per account at a time. I have used a library called Sentinelsat for that because I have found it easier to work with. Then I used Snappy, a python-binding of a very useful and free remote sensing software called SNAP.

SNAP comes in both 32 and 64-bit, I downloaded the later.

SNAP doesn’t come with Python, so you’ll need to install that by yourself. Since I already have 64-bit Python installed by ArcGIS Pro, I cloned a separate Python environment and installed Snappy in it. The steps to install snappy is here.

After that you are ready to go.

A lot can be done to this code ! The geojson file is created from a very generalised shapefile of Bangladesh by using ArcGIS Pro. There are a lot of free online tools to convert shapefile to geojson and WKT. Notice that the code will skip download if the file is already there but will keep the processing on, so comment out line 197 when necessary. Updated the code almost completely.

The steps of processing raw files of Sentinel-1 used here are not the most generic way, note that there are no authentic way for this. Since different research require different steps to prepare raw data, you will need to follow yours.