Linux SNAP DEM assisted co-registration does not work

Hello,

I am trying to use two S1 GRD products and do a simple “DEM assisted co-registration” on them after applying orbit correction. This task works easily with windows distribution of SNAP but produces an Error while using SNAP in Linux. I would appreciate if someone can explain it or correct this bug in the future version updates of SNAP.

I think there are two reasons, the fist one is the installation of SNAP under LINUX, the other might be LINUX itself creates the problem, similar issue is discussed in here,

Source of the post

is SNAP updated on both operating systems?
You can confirm under Menu > Help > Check For Updates

Yes I updated both window and Linux versions this week to version 6.0. It is disappointing as I am trying (in a next step) to access snap functions from within python and use these functions (Orbit Correction and Co-registration) in a workflow … I would appreciate any hint on this.

the current version of S1TBX is 6.0.6

Could you please shoretly confirm?
You can check with Menu > Help > About SNAP

Another option is to use a different DEM. Which one did you use so far?

Yes you are right the version of my S1TBX is 6.0.6.
Considering that I am using the similar geographic position as of the tutorial (Rink Glacier) I know that I have to change the DEM from SRTM to another DEM. I chose ASTER 1sec GDEM. Then I get this :

maybe the ArcticDEM is an option to you then: https://www.pgc.umn.edu/data/arcticdem/

Thank you for the link. I will check it however I do not believe it should be an issue of incompatibility of a DEM with the data. In any case (even when you select a bad, incompatible DEM) you should be able to produce co-registered data (which are poorly co-registered). The issue is that I do the same procedure under Windows, using the same data and the same DEM and I get good quality co-registered data as the result. But not when I use the linux distribution of SNAP Desktop!

you are probably right that the DEM is not the problem.

That’s very strange. I’ve never seen that. Can you purge and reinstall SNAP. Maybe something went wrong during the compilation of SNAP

Second option : maybe you can try to install SNAP using source https://senbox.atlassian.net/wiki/spaces/SNAP/pages/10879039/How+to+build+SNAP+from+sources

If this error is not reproduced on other installations of SNAP (on a linux system) then you are right. Most probably there is something wrong with my installation. I am trying to find the installation path of my SNAP on linux and I am a bit confused. Alas, I am not a good Linux user! Then I would appreciate if you can navigate me to a page where the procedure of installing/uninstalling SNAP is explained. Or draw me some hints to be able to follow…

All I can see so far is a hidden installation folder in my Linux :
/home/sina/.snap/ (containing some folders including the empty snap-jython folder )
and
/usr/local/bin/ (containing snap executable and snap-conf-optimizer)
I neither can find the famous snappy-conf directory !

Thanks in advance!

I never used it, but in your snap installation folder (not the hidden .snap, the true snap), if you go into the bin subfolder, I see an uninstall file. In a terminal, just write ./uninstall and see if SNAP gets properly uninstalled

side note : the snappy-conf if there too

To install SNAP on linux, you prbably download a .sh file with a name like this : “esa-snap_sentinel_unix_6_0.sh”. Again, you should be able to launch it for a proper SNAP installation

1 Like

Thank you very much indeed :slight_smile:
Hello to SNAP-Linux !

Thanks a lot for these details!
I found the folder (in my case /opt/snap/bin/) and yes both the “uninstall” and “snappy-conf” are there. When I do (sudo ./uninstall) it seems that it can not find the JVM. I have java (openjdk version “1.8.0_212”) installed on my machine though!

From my knowledge, openjdk is not suitable with SNAP. From https://senbox.atlassian.net/wiki/spaces/SNAP/pages/10879039/How+to+build+SNAP+from+sources

  • Java JDK = v1.8 (JDK, not JRE. We recommend an Oracle JDK. Java 9 or 10 do not work at the moment)
1 Like

Sorry if it sounds obvious! Just to make sure by Java 9 or 10 not working at the moment it means that I have to find java version 8 ? Then the Java JDK1.8 is available with this version?

I struggled a bit too because I was facing similar issues when I was using openJDK instead of the Oracle one. I think it is this one : https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html but not totally sure…

I did it a long time ago but do not remember very well

1 Like

Yes you are right with the link. Actually I was also on the same page. For more explanation and for those who use RPM packages, there is a good explanation for installation of the right JDK1.8 provided here :

Installation of the 64-bit JDK on RPM-based Linux Platforms

1 Like

Thanks for the link. That can be useful :slight_smile:

Hi again!

In struggle to get rid of the current SNAP I face the same error as mentioned here. I wonder if you have also seen such error and if you could find a solution for it?
At this time I managed to uninstall the openjdk from my system and have :

java version “1.8.0_202”
Java™ SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot™ 64-Bit Server VM (build 25.202-b08, mixed mode)

As I do (sudo ./uninstall) in the /opt/snap/bin/ directory it gives the Error:

No suitable Java Virtual Machine could be found on your system.
The version of the JVM must be at least 1.8.
Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

I edited my .bashrc to provide the exact address of $JAVA_HOME and $INSTALL4J_JAVA_HOME.
But the same error keeps on appearing !