I have been using the Graph Processing Tool for processing some Sentinel 1 data through the GUI and need to get it working in the Mac terminal, for eventual use of scaling it up to much larger workflows on a Linux system.
However I am struggling to get it working, as the command snap --help is not recognised, (even though snap is correctly installed) and the gpt command is taken up by a partitioning software of the same name which is needed on this work laptop.
The snap directory itself is located in /Users/chris/.snap/ and the graph xmls themselves are further down the directory tree in graphs/User\ Graphs/*.xml
How can I get the snap gpt working on Mac in this situation? Or would a virtual machine/batch processing tool like pyroSAR be a better alternative?
The partitioning software hides SNAP gpt in your case. You need to use the full path instead.
By default SNAP is installed at /Applications/snap
So you need to invoke
/Applications/snap/bin/gpt -help
The directory /Users/chris/.snap/ you have mentioned is used for application data but does not contain the executables.
I have put it in the command line and it works. However, I have got another problem about realpath and gptpath.
./processDataset.bash: line 60: /Users/pereira/Applications/snap/bin/gpt: No such file or directory
./processDataset.bash: line 58: realpath: command not found
I have seen the topic “Bulk processing with GPT - command not found” and I´m working on it, but I think maybe the problem is on it:
Hi,
I think it is not the minus sign before the ‘h’
Yours looks like this –h
When I write it, it looks like this: -h
So, please try a “different” minus.
GDAL libraries are installed along with the s2tbx.
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: GDAL 3.0.2 found on system. JNI driver will be used.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 3.0.2 set to be used by SNAP.
Native library load failed.
java.lang.UnsatisfiedLinkError: /Users/Luca/.snap/auxdata/gdal/gdal-3-0-X-jni/libgdalalljni.dylib: dlopen(/Users/Luca/.snap/auxdata/gdal/gdal-3-0-X-jni/libgdalalljni.dylib, 0x0001): Library not loaded: /usr/local/lib/libgdal.26.dylib
Referenced from: /Users/Luca/.snap/auxdata/gdal/gdal-3-0-X-jni/libgdalalljni.dylib
Reason: tried: ‘/usr/local/lib/libgdal.26.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libgdal.26.dylib’ (no such file), ‘/usr/local/lib/libgdal.26.dylib’ (no such file), ‘/usr/lib/libgdal.26.dylib’ (no such file, not in dyld cache)
SEVERE: org.esa.s2tbx.dataio.gdal.GDALLoader: Failed to initialize GDAL native drivers. GDAL readers and writers were disabled.java.lang.reflect.InvocationTargetException
INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.
Usage:
gpt | [options] [ …]
…
…