Coregistration of LiDAR and SAR images returns an IllegalArgumentException

Hi,

I’m coregistering two SAR images (TerraSAR-X images) with a LiDAR DSM, the latter raster being the master. The coregistration seems to be done correctly but I’m getting the error below in the terminal, which normally shouldn’t appear (at least I didn’t see it the last time I executed this graph, I think I was using Snap5 then):

java.lang.IllegalArgumentException: Ellipsoid.ell2xyz : input values for phi/lambda have to be in radians!
        at org.jlinda.core.Ellipsoid.ell2xyz(Ellipsoid.java:97)
        at org.jlinda.core.Ellipsoid.ell2xyz(Ellipsoid.java:137)
        at org.jlinda.core.SLCImage.<init>(SLCImage.java:208)
        at org.esa.s1tbx.insar.gpf.InSARStackOverview.calculateInSAROverview(InSARStackOverview.java:226)
        at org.esa.s1tbx.insar.gpf.coregistration.CreateStackOp.getBaselines(CreateStackOp.java:372)
        at org.esa.s1tbx.insar.gpf.coregistration.CreateStackOp.updateMetadata(CreateStackOp.java:352)
        at org.esa.s1tbx.insar.gpf.coregistration.CreateStackOp.initialize(CreateStackOp.java:300)
        at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:486)
        at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:273)
        at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:387)
        at org.esa.snap.core.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:77)
        at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:195)
        at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
        at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
        at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
        at org.esa.snap.core.gpf.graph.GraphContext.initOutput(GraphContext.java:162)
        at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:91)
        at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:64)
        at org.esa.snap.core.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:128)
        at org.esa.snap.core.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:86)
        at org.esa.snap.core.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:534)
        at org.esa.snap.core.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:388)
        at org.esa.snap.core.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:287)
        at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:188)
        at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:121)
        at org.esa.snap.core.gpf.main.GPT.run(GPT.java:54)
        at org.esa.snap.core.gpf.main.GPT.main(GPT.java:34)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.esa.snap.runtime.Launcher.lambda$run$14(Launcher.java:55)
        at org.esa.snap.runtime.Engine.runClientCode(Engine.java:189)
        at org.esa.snap.runtime.Launcher.run(Launcher.java:51)
        at org.esa.snap.runtime.Launcher.main(Launcher.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:62)
        at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:101)
        at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:16)

The graph of the coregistration consists of the following operations: CreateStack -> Cross-Correlation -> Warp.
Is it the way the coregistration should be done in Snap 6?

Thanks.

You should not try to co-register but to terrain-correct using your DSM.

1 Like

I was actually Terrain-Correcting the two SAR images first using the DSM, before coregistering them with the same DSM.
But I think you’re right, the coregistration seems pointless in my case.