I need to know what happen witn save image export view as image



Save image to Geotiff-002

After I work with export view as image the box dialog makes reference that the image could not be exported!! What do you think about it? Is a problem of Snap´s new version? I hope your response!!

The screen snaps don’t capture the full details of the error. It could be helpful to attach the messages.log file. Two things that sometimes cause problems for SNAP are using paths with spaces in names (replace spaces with underscores or some other character) and virtual bands.

This is the error it throws when I try to export view as both .kmz file and geotiff file - Tiff with geolocation

java.lang.NegativeArraySizeException
at java.awt.image.DataBufferByte.(DataBufferByte.java:76)
at java.awt.image.Raster.createInterleavedRaster(Raster.java:266)
at java.awt.image.BufferedImage.(BufferedImage.java:391)
at org.esa.snap.rcp.actions.file.export.ExportImageAction.createImage(ExportImageAction.java:275)
[catch] at org.esa.snap.rcp.actions.file.export.ExportKmzFileAction$SaveKMLSwingWorker.doInBackground(ExportKmzFileAction.java:337)
at com.bc.ceres.swing.progress.ProgressMonitorSwingWorker.doInBackground(ProgressMonitorSwingWorker.java:56)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

About ten days ago it started with this error for both close images and past images

Images that were processed before this time do not throw an error. Therefore, it is that I verified the procedure, which I have checked and it turns out to be the same

Based on your observations, I can tell you that I have not used virtual bands. On the other hand, it had never thrown an error with routes that had spaces, only one, since I don’t usually leave spaces. I greatly appreciate your answers

You should think about what could have changed between the last time export view worked and when you first encountered the error. The log directory should have some older messages.log.1 and messages.log.2 as well as update.log* files that might help you construct a timeline for the problem.

You don’t mention the SNAP version and update status which could be useful for anyone trying to reproduce the error. There have been some recent updates so if you haven’t installed them that is worth a try.

You could try backing up the .snap directory, deleting it, and installing SNAP and all updates again.

Hello gnwiii:

I reinstalled SNAP and all updates again, but I received this…

SEVERE [org.esa.snap.rcp.SnapApp]: The image could not be exported.
java.lang.NegativeArraySizeException
at java.awt.image.DataBufferByte.(DataBufferByte.java:76)
at java.awt.image.Raster.createInterleavedRaster(Raster.java:266)
at java.awt.image.BufferedImage.(BufferedImage.java:391)
at org.esa.snap.rcp.actions.file.export.ExportImageAction.createImage(ExportImageAction.java:275)
at org.esa.snap.rcp.actions.file.export.ExportImageAction.createImage(ExportImageAction.java:269)
[catch] at org.esa.snap.rcp.actions.file.export.AbstractExportImageAction$SaveImageSwingWorker.doInBackground(AbstractExportImageAction.java:205)
at com.bc.ceres.swing.progress.ProgressMonitorSwingWorker.doInBackground(ProgressMonitorSwingWorker.java:56)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Did you delete the .snap directory (after creating a backup)? Can you provide a small test case (data and processing steps) to demonstrate the problem? If others can easily reproduce the steps that lead to the problem we can determine whether there is a bug in SNAP or something in your configuration. One good strategy is to look for a tutorial that provides suitable example data which many others will already have.

I was doing the different steps, just as you have requested:

I started with this sequence

  1. Apply Orbit File
  2. Thermal Noise Removal
  3. Remove GRD Border Noise
  4. Calibration
  5. Speckle Filter
  6. Range Doppler Terrain Correction

I was using the default values

I was able to save the images in each step using the Export as view image command, but after applying Range Doppler Terrain Correction on whatever band I want to apply, the dialog box appears indicating that the image could not be exported.

I used the following images
a) S1B_IW_GRDH_1SDV_20180511T090617_20180511T090642_010871_013E30_181A
b) S1B_IW_GRDH_1SDV_20210401T090633_20210401T090658_026271_0322AA_42D3

Is it possible that the coverage exceeds the file size limit of GeoTiff?
Please try sticking to the BEAM DIMAP format first and once you have conducted terrain correction you can still export it to another format. Often this is not even neessary: Export of products from SNAP

Andreas hello,

if I reduce the size of the image, export view as image works.

But something has changed or done with SNAP. Before version 8.0.5, this view export could be done without any problem with a heavier image. It is not the hardware since I have a more powerful one.

On the other hand, I think it is time that the subset could be made with an irregular polygon with four or five points by using the mouse, since it would allow to adjust the size of the file, according to the needs of the operator. This is an idea that occurred to me while writing this, nothing more.

Finally, I add that I have not yet made an assessment of the maximum size of the supported image to carry out the export with the command to export view as image, with extension -tiff with geolocation. When I have the data if it is relevant I will upload it to the forum.

Thanks you so much for everything!

1 Like