EGM96 always being applied to external DEM in Terrain-Correction Operator


When using the Terrain-Correction operator, EGM96 is always applied to the External DEM even if the “Apply Earth Gravitational Model” checkbox is not checked.

The cause is that in, the variable “externalDEMApplyEGM” is initialized as true while the checkbox “externalDEMApplyEGMCheckBox” is initially not checked.

I come up with two solutions, but I don’t know which is better for the design of SNAP. Do you have any idea?

  1. Initializing the variable “externalDEMApplyEGM” as false.
  2. Putting the “externalDEMApplyEGMCheckBox.setSelected(externalDEMApplyEGM);” on line 413 outside of the if statement starting with “if (extDEMFile != null){”.