Hello!
I have run into quite a bizarre problem when resampling atmospherically corrected Sentinel-2 images to 10m resolution.
The output format is GeoTIFF-BigTIFF, but when I start the process, the file just gets bigger and bigger, until it fills up my entire free memory (~150gb), terminates the process and shows the following error text:
java.io.IOException: There is not enough space on the disk
at java.io.RandomAccessFile.writeBytes(Native Method)
at java.io.RandomAccessFile.write(Unknown Source)
at javax.imageio.stream.FileImageOutputStream.write(Unknown Source)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFNullCompressor.encode(TIFFNullCompressor.java:104)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageWriter.writeTile(TIFFImageWriter.java:2506)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageWriter.write(TIFFImageWriter.java:2920)
Caused: javax.imageio.IIOException: I/O error writing TIFF file!
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageWriter.write(TIFFImageWriter.java:2954)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageWriter.write(TIFFImageWriter.java:2614)
at org.esa.snap.dataio.bigtiff.BigGeoTiffProductWriter.writeBandRasterData(BigGeoTiffProductWriter.java:195)
at org.esa.snap.core.gpf.common.WriteOp.writeTileRow(WriteOp.java:398)
at org.esa.snap.core.gpf.common.WriteOp.computeTile(WriteOp.java:316)
Caused: org.esa.snap.core.gpf.OperatorException: Not able to write product file: ‘F:\Sentinel2\S2A_USER_MTD_SAFL2A_PDMC_20160523T144413_R079_V20160523T095404_20160523T095404_resampled.tif’
at org.esa.snap.core.gpf.common.WriteOp.computeTile(WriteOp.java:350)
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: Not able to write product file: ‘F:\Sentinel2\S2A_USER_MTD_SAFL2A_PDMC_20160523T144413_R079_V20160523T095404_20160523T095404_resampled.tif’
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 com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:247)
[catch] at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)
I am pretty sure that a resampled S2 L2A image should not take up 150 gb.
When I resample L1C products, however, it goes smoothly and within an hour I get my result.
Is there a workaround for this? I would like to do some biophysical calculations, but I cannot do them with L2A images, because SNAP requires them to be resampled to a single resolution.
Any help greatly appreciated.