Apply EGM to External DEM toggle does not work in snappy

I use Snappy to generate interferometric products, many of these have the option to apply the external DEM (interferogram, topoPhaseRemoval, terrainFlattening, terrainCorrection, adElevation) - when applying the DEM using the SNAP GUI and Graphs you get the option to “externalDEMApplyEGM”. I set this parameter to “false” for the operators as follows:

parameters.put(“demName”, “External DEM”)
parameters.put(“externalDEMFile”, “TDX”)
parameters.put(“externalDEMNoDataValue”, “-32768”))
parameters.put(“externalDEMApplyEGM”, “false”))

However, in the output metadata it seems to ignore this input and report “externalDEMApplyEGM” as “true”.

Is it possible that this parameter is not properly captured by snappy or the operator ?

shouldn’t the parameter externalDEMFile contain the absolute path to the external dem, something like "C:\TDX_WGS84.tif"? Maybe this is why the other parameters are ignored.

Sorry, yes, I shortened it for the example. The program uses “/home/share/dem/tdx.tif”

alright, I see. I have no answer then, sorry :slight_smile:

We can delete this post - It seems like I have been making a mistake with my snappy parameter loading.

I essentially started my python script with

HashMap = snappy.jpy.get_type(“java.util.HashMap”)
parameters = HashMap()

And then every function would do:

parameters.clear()
parameters.put(“Arg”, “Val”)

But I think I have not been clearing parameters properly all the time or loading parameters for two function without clearing in between resulting in some being remembered in the Hashmap causing strange behavior.