NullPointerException during band conversion to dB

Hi All,

I am receiving a java.lang.NullPointerException when using the Raster > Data Conversion > Converts bands to/from dB function on ALOS Palsar mosaics. I am running SNAP v.7.0.0 on MacOS Mojave 10.14.6.

Any troubleshooting tips are appreciated.

Here’s an example input window:

And the error window

Below is the full error log:
java.lang.NullPointerException at org.esa.snap.raster.gpf.LinearTodBOp.computeTile( Caused: org.esa.snap.core.gpf.OperatorException at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException( at org.esa.snap.raster.gpf.LinearTodBOp.computeTile( at org.esa.snap.core.gpf.internal.OperatorImage.computeRect( at at Caused: org.esa.snap.core.gpf.OperatorException: java.lang.NullPointerException at org.esa.snap.core.gpf.internal.OperatorExecutor$GPFImagingListener.errorOccurred( at at at at at com.bc.ceres.glevel.MultiLevelImage.getData( at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile( at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile( at org.esa.snap.core.gpf.internal.OperatorImage.computeRect( at at at at [catch] at

calibrated data in dB scale requires the storage of negative decimal values. Maybe GeoTiff is not the best option for this. Have you checked if the processing works if you select BEAM DIMAP as output format?

I guess the issue is here because the bands of the source product do not have a unit set. If you set the unit it should work.

@lveci can you make the opertor robust to missing units?


Thanks @ABraun – yes, I did try other outputs and got the same result.

Thanks @marpet. This worked! And, explains why it was working for raw date previously (which do have units), but not for the mosaics, (which do not have units set).

To confirm - is intensity the correct unit for these mosaic products? Thanks again for your reply

1 Like

The unit should be just ‘db’. Without the quotes , of course.
But it will also work with some other unit. but then steps into a different branch in the source code. I can’t tell what the difference is. Maybe @lveci or @jun_lu can.

Yes, for converting bands to dB, the unit of the source bands is assumed to be intensity.

1 Like