Opening .img (Disk Image File) in Python

As I have mentioned in my aforementioned post, I experience the same troubles you have now of os win10, That’s why I suggest to you now to follow all the steps, were done.

Source of the post

@ABraun @falahfakhri

I could finally run from snappy import ProductIO

The following steps were followed in sequence,

  1. Install Anaconda 2.7 from https://www.anaconda.com/distribution/

  2. Install SNAP from here
    https://step.esa.int/main/download/snap-download/
    and create the SNAP-Python interface by assigning the python.exe path as C:\ProgramData\Anaconda2\python.exe in here
    SNAP_Python_Interface

  3. Open SNAP Command Line and type,
    snappy-conf C:\ProgramData\Anaconda2\python.exe

  4. From the following path,
    C:\Users\Your_User_Name\ .snap\snap-python
    copy two things,
    a. a folder by the name snappy
    b. a file by the name snappy.properties
    to C:\ProgramData\Anaconda2\Lib\site-packages

  5. Open Anaconda Prompt (Anaconda2) and type start spyder

  6. In the command window type from snappy import ProductIO

and you finally reach here :partying_face:

So far so good but I guess the next thing is setting up GDAL.

2 Likes

good job!

gdal for python also has some smaller things to know, but a nice tutorial is given in this book: https://www.oreilly.com/library/view/learning-geospatial-analysis/9781783281138/
You might find it somewhere else :wink:

1 Like

@ABraun
Oh yes, you mean in a flea market :wink:
By the way, I was wondering if there is a page where I can find all the commands and their syntax associated with Snappy.

Yes, it’s available, Preprocessing of Sentinel-1 SAR data via Snappy Python module

Take a look at this post for more details,

Source of the post

Thanks @falahfakhri
Will go through the code and write back if I don’t get a piece of code.