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(LinearTodBOp.java:136) Caused: org.esa.snap.core.gpf.OperatorException at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:415) at org.esa.snap.raster.gpf.LinearTodBOp.computeTile(LinearTodBOp.java:176) at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:80) at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) Caused: org.esa.snap.core.gpf.OperatorException: java.lang.NullPointerException at org.esa.snap.core.gpf.internal.OperatorExecutor$GPFImagingListener.errorOccurred(OperatorExecutor.java:376) 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:407) at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:393) at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:73) at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137) 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) [catch] at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)

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?

2 Likes

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