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

Please open these two files

  • coreg_ifg_computation.xml
  • coreg_ifg_computation_subset.xml

and substitute only this line

<useSuppliedShifts>false</useSuppliedShifts>`

by

<useSuppliedRangeShift>false</useSuppliedRangeShift>
<useSuppliedAzimuthShift>false</useSuppliedAzimuthShift>
3 Likes

I followed your instructions but got this error:

Coregistration and Interferogram computation started:

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

/application/pi/SAMIRA/subsidence//split/20191208/20191208_IW2.dim

[1] Processing slave file :20191208_IW2.dim

SNAP STDOUT:INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters

INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: GDAL 2.4.1 found on system. JNI driver will be used.

INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 2.4.1 set to be used by SNAP.

Native library load failed.

java.lang.UnsatisfiedLinkError: /application/pi/.snap/auxdata/gdal/gdal-2-4-X-jni/libgdalalljni.so: libgdal.so.20: cannot open shared object file: No such file or directory

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.

INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 2.4.1 set to be used by SNAP.

Executing processing graph

INFO: org.hsqldb.persist.Logger: dataFileCache open start

WARNING: org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp: SpectralDiversity (range shift): Cross-correlation failed for all bursts, set range shift to 0.0

Integration problem using method: null

Integration problem using method: null

java.lang.NullPointerException

Waiting thread received a null tile.

Waiting thread received a null tile.

Waiting thread received a null tile.

Waiting thread received a null tile.

java.lang.NullPointerException

90% done.

org.esa.snap.core.gpf.OperatorException: Integration problem using method: null

at org.esa.snap.core.gpf.graph.GraphProcessor$GPFImagingListener.errorOccurred(GraphProcessor.java:379)

at com.sun.media.jai.util.SunTileScheduler.sendExceptionToListener(SunTileScheduler.java:1646)

at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:921)

at javax.media.jai.OpImage.getTile(OpImage.java:1129)

at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085)

at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)

at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:449)

at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:435)

at org.esa.snap.core.gpf.Operator.getSourceTile(Operator.java:459)

at org.esa.s1tbx.sentinel1.gpf.TOPSARDeburstOp.computeTileInOneSwathFloat(TOPSARDeburstOp.java:904)

at org.esa.s1tbx.sentinel1.gpf.TOPSARDeburstOp.computeTileStack(TOPSARDeburstOp.java:811)

at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:122)

at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:86)

at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)

at javax.media.jai.OpImage.getTile(OpImage.java:1129)

at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085)

at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)

at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:449)

at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:435)

at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:116)

at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:86)

at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)

at javax.media.jai.OpImage.getTile(OpImage.java:1129)

at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:247)

at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)

Caused by: org.esa.snap.core.gpf.OperatorException: Integration problem using method: null

at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:440)

at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.computeTileStack(SpectralDiversityOp.java:827)

at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:122)

at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:86)

at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)

… 22 more

Caused by: org.esa.snap.core.gpf.OperatorException: Integration problem using method: null

at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:440)

at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.estimateRangeOffset(SpectralDiversityOp.java:942)

at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.computeTileStack(SpectralDiversityOp.java:806)

… 25 more

Caused by: org.esa.snap.core.gpf.OperatorException: Integration problem using method: null

at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.integrateImageShifts(SpectralDiversityOp.java:1397)

at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.estimateRangeOffset(SpectralDiversityOp.java:901)

… 26 more

Caused by: java.lang.NullPointerException

at org.esa.s1tbx.sentinel1.gpf.SpectralDiversityOp.integrateImageShifts(SpectralDiversityOp.java:1384)

… 27 more

Error: Integration problem using method: null

– org.jblas INFO Deleting /tmp/jblas5303060032640908120/libquadmath-0.so

– org.jblas INFO Deleting /tmp/jblas5303060032640908120/libgfortran-4.so

– org.jblas INFO Deleting /tmp/jblas5303060032640908120/libjblas_arch_flavor.so

– org.jblas INFO Deleting /tmp/jblas5303060032640908120/libjblas.so

– org.jblas INFO Deleting /tmp/jblas5303060032640908120

[1] Finished process in 84.9906148911 seconds.

I’m not sure about the GDAL error, maybe @marpet has an idea.

But we are getting closer.

As far as I know GDAL 3.0 is shipped with SNAP 8 and this is what should be used.
But @oana_hogoiu is the expert for GDAL.

when I run python splitting_slaves.py project.conf script I get this error: Does this mean that this step is not performed properly and must be repeated?
[14] Folder: 20170715
/application/pi/SAMIRA/subsidence//slaves/20170715
[’/application/pi/SAMIRA/subsidence//slaves/20170715/S1A_IW_SLC__1SDV_20170715T030054_20170715T030121_017476_01D369_C96C.zip’]
FILE(s) : /application/pi/SAMIRA/subsidence//slaves/20170715/S1A_IW_SLC__1SDV_20170715T030054_20170715T030121_017476_01D369_C96C.zip
[’/application/pi/snap/bin/gpt’, ‘/application/pi/SAMIRA/subsidence//graphs/splitgraph2run.xml’, ‘-c’, ‘32G’, ‘-q’, ‘4’]
SNAP STDOUT:INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: GDAL 2.4.1 found on system. JNI driver will be used.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 2.4.1 set to be used by SNAP.
Native library load failed.
java.lang.UnsatisfiedLinkError: /application/pi/.snap/auxdata/gdal/gdal-2-4-X-jni/libgdalalljni.so: libgdal.so.20: cannot open shared object file: No such file or directory
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.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 2.4.1 set to be used by SNAP.
Executing processing graph
INFO: org.hsqldb.persist.Logger: dataFileCache open start
…10%…20%…30%…40%…50%…60%…70%…80%…90% done.

[14] Finished process in 43.92304492 seconds.

let’s wait for Oana’s opinion on this.
But you can check if the splitting worked by opening the processed data in SNAP.

My opinion is that you may re-install SNAP but only selecting the S1TBX as the error is done by a package belonging to the S2TBX.

Hello. Thank you all,
I run the splitting script, and fortunately it worked. . But for the coregistration script it not workd even after follow @mdelgado instruction, and I get this error:
/application/pi/SAMIRA/subsidence//split/20190424/20190424_IW2.dim
[2] Processing slave file :20190424_IW2.dim

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
done.

Error: [NodeId: Read] The ‘file’ parameter is not set

[2] Finished process in 3.78753995895 seconds.

What is the meaning of ‘file’ parameter is not set?
Thank you for your guidance

Files should be zipped… is this the case?
Or is it the original data corrupted?

could it be that the master is not configured correctly? Or would this rather result in a “… not found” message?

1 Like

I do reinstallation of SNAP ver. 8 (the use of the SNAP internal version of GDAL 3.0 has been set), and call splitting script then run coreg-ifg script, but is not solved yet and coregistration failed. Do you have other idea for fix it?

what happens when you load splitted master product into SNAP and try to coregister it there with one of the slave images manually using BackGeocoding? If it works inside SNAP, the problem could be the config file. If it does not work inside SNAP, the input data is already invalid (e.g. empty after split)

It is the same when I perform it manually.

please share a screenshot of both the master and the slave image you used for this.

According to your instructions, I ran it manually, it is the same.

I have understood that already. I asked if you can share an image of the input products (master and slave) before the coregistration. At best with the WorldView tab open at the bottom left so we see how they overlap.

I did not understand correctly. Sorry! Do you mean this?
ddd|690x387

these are the original products, but I meant the products after TOPS Split was applied by the first script “splitting_slaves.py”

how many bursts do they contain?

Please open both and show their intensity bands as screenshots

that looks alright, thank you. Now please a screenshot of Menu > Help > About SNAP