Snap2stamps package: a free tool to automate the SNAP-StaMPS Workflow

I am unable to install libgfortran-4:

$ sudo apt-get install libgfortran-4

‘Unable to locate package’

snap2stamps was working fine 9 months ago (Ubuntu 16.04, Snap v6 and Python 2.7). Something happened while I was away, now I am having the above issues, first with stamps_export hanging, now with coreg_ifg_topsar. Should I clean install to a newer version of Linux, Python and SNAP, or continue to try and fix my current Ubuntu 16.04 install? Thanks!

sudo apt-get install -y libgfortran4

or
sudo apt-get install gcc-4.8-base libgfortran4
or
try to install manually,

Thanks, I have tried both these install commands but get the message:

‘Unable to locate package libgfortran4’

Is this because I am on Ubuntu 16.04?
What do you mean install manually?

Thanks, I am a novice with Python…

Please follow below steps:

  1. sudo apt-get update

  2. sudo apt-get upgrade

Then follow the below link commands

How to install libgfortran-4.8-dev On Ubuntu 16.04 Lts? Uninstall and remove libgfortran-4.8-dev Package (devmanuals.net)

One more important point, while running the stamps_Export please use below command (Instead of python use python2).

$ python2 stamps_export.py project.conf

First try this.

1 Like

I did as you suggested, and nstall libgfortran-4.8-dev sucessfully:

Unfortunately I still get the below error when running coreg:

Have you tried this?

1 Like

Thanks Suri! I can now complete all snap2stamps except stamps_export.

stamps_export does not complete, it just stops at this point:

I am currently running Ubuntu 18.04, SNAP 6.0, Python 2.7.17 Any suggestions?

Please update SNAP latest version 8.0.3

This version does no longer work. Problem in the last part of snap to stamps

Thanks @ABraun but upgrading to SNAP 8.0 did not fix the problem last time, and has not fixed things this time. stamps_export.py still does not run and now that I upgraded to SNAP 8.0 things are worse because splitting_slaves.py does not run.

So now I am back to where I started this thread:

#####################################################################

## TOPSAR Splitting and Apply Orbit

#####################################################################

[1] Folder: 20190517
/media/wharfbanger/Data1/Project/StaMPS_Export/slaves/20190517
[’/media/wharfbanger/Data1/Project/StaMPS_Export/slaves/20190517/S1A_IW_SLC__1SDV_20190517T172929_20190517T172959_027270_03132F_D83E.zip’]
FILE(s) : /media/wharfbanger/Data1/Project/StaMPS_Export/slaves/20190517/S1A_IW_SLC__1SDV_20190517T172929_20190517T172959_027270_03132F_D83E.zip
[’/home/wharfbanger/snap/bin/gpt’, ‘/media/wharfbanger/Data1/Project/StaMPS_Export/graphs/splitgraph2run.xml’, ‘-c’, ‘8G’, ‘-q’, ‘8’]
SNAP STDOUT:INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.
Executing processing graph
INFO: org.esa.s1tbx.commons.io.ImageIOFile: Using FileCacheImageInputStream
INFO: org.esa.s1tbx.commons.io.ImageIOFile: Using FileCacheImageInputStream
INFO: org.esa.s1tbx.commons.io.ImageIOFile: Using FileCacheImageInputStream
INFO: org.esa.s1tbx.commons.io.ImageIOFile: Using FileCacheImageInputStream
INFO: org.esa.s1tbx.commons.io.ImageIOFile: Using FileCacheImageInputStream
INFO: org.hsqldb.persist.Logger: dataFileCache open start
Exception calling QC Rest API: Connect to qc.sentinel1.eo.esa.int:443 [qc.sentinel1.eo.esa.int/131.176.235.71] failed: Connection timed out (Connection timed out)
WARNING: org.esa.s1tbx.sar.gpf.orbits.ApplyOrbitFileOp: Connect to qc.sentinel1.eo.esa.int:443 [qc.sentinel1.eo.esa.int/131.176.235.71] failed: Connection timed out (Connection timed out)
Exception calling QC Rest API: Connect to qc.sentinel1.eo.esa.int:443 [qc.sentinel1.eo.esa.int/131.176.235.71] failed: Connection timed out (Connection timed out)
Connect to qc.sentinel1.eo.esa.int:443 [qc.sentinel1.eo.esa.int/131.176.235.71] failed: Connection timed out (Connection timed out) due to Connection timed out (Connection timed out)
** done.**

Error: [NodeId: Apply-Orbit-File] Connect to qc.sentinel1.eo.esa.int:443 [qc.sentinel1.eo.esa.int/131.176.235.71] failed: Connection timed out (Connection timed out) due to Connection timed out (Connection timed out)

[1] Finished process in 276.049514055 seconds.

I am now running Ubuntu 18.04, SNAP 8.0, Python 2.7.17 Any suggestions?

I see, sorry. Sometimes all the different issues become confusing and hard to overlook.
The orbit problem is related to this: Orbit file timeout (March 2021)
It is fixed for the GUI but retrieval of orbits from GPT or snappy is still not working in all cases. Hopefully, an update will solve it.

Thanks ABraun! I looked at that thread and it seems I should stay on SNAP 6 so I can run splitting_slaves and coreg_ifg_topsar. I just need to figure out how to manually download orbit files for use with stamps_export. Does this sound right?

actually, the orbit files are applied in the first script (splitting_slaves.py) while the export partially struggles with inavailable DEMs. But this can be solved by this hint here or also this one: Using StampsExport with an external dem

Dear Wharfbanger,
Please follow below steps (After updating to SNAP8.0.3).

SNAP FAQs - SNAP - SNAP Wiki (atlassian.net)

If that SRTM link won’t work, insert below one.

Thanks. I have now updated to SNAP 8.0.3 and changed line 27 in snap.auxdata.properties
to:

DEM.srtm3GeoTiffDEM_HTTP = http://skywatch-auxdata.s3-us-west-2.amazonaws.com/dem/SRTM90/tiff/

Still stamps_export is stuck…

I’m out of ideas then, sorry.

Try this link, it is working from me.

A quick update. I now have a work-around to complete snap2stamps by running splitting_slaves.py, coreg_ifg_topsar.py under Windows 10, python 2.7, SNAP 8.03.

I then switch to Ubuntu 16.04 for stamps_export.py and mt_prep_snap and StaMPS to complete my processing.

I would like to be able to run everything in Ubuntu 16.04 as was doing previously, but coreg_ifg_topsar.py fails with the following message:

I tried installing libgfortran3, libgfortran4 and libgfortran5, but this did not solve the issue. Is anyone running coreg_ifg_topsar.py successfully in Linux? If so, what is your Linux version? Python version? SNAP version? Anything else I might be missing?