I try to resample a sentinel 2a image in 10m resolution and I get the following error message java.lang.RuntimeException: Cannot construct DataBuffer. at com.sun.media.jai.util.DataBufferUtils.constructDataBuffer(DataBufferUtils.java:132) at com.sun.media.jai.util.DataBufferUtils.createDataBufferDouble(DataBufferUtils.java:293) at javax.media.jai.ComponentSampleModelJAI.createDataBuffer(ComponentSampleModelJAI.java:274) at javax.media.jai.RecyclingTileFactory.createTile(RecyclingTileFactory.java:389) at javax.media.jai.PlanarImage.createWritableRaster(PlanarImage.java:1982) at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1065) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) Caused: org.esa.snap.core.gpf.OperatorException: Cannot construct DataBuffer. at org.esa.snap.core.gpf.internal.OperatorExecutor$GPFImagingListener.errorOccurred(OperatorExecutor.java:375) 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.opimage.CropOpImage.getTile(CropOpImage.java:122) at javax.media.jai.RenderedOp.getTile(RenderedOp.java:2257) at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:911) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) 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:406) at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:392) 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)
Yes, this should be enough.
Can you show me the configuration you have used?
Which product do you try to resample, can you give me the name?
Are you working on the command line or in the desktop application?
Last question, which operating OS are you using?
We just tried it with the same product also on a PC (Windows10 x64) which has 16GB RAM too. It worked well.
Some other reason why it might fail on your machine:
You have increased the memory after the SNAP installation
You have other memory consuming tasks running in the background
I could not update plugin installer, and it always remind me unconnected to updata center. I want to know how to resample sentinel2A data in a shapefile extent and in band 2,3,4,8. I appreciate for your reply.
Maybe you are behind a proxy server which causes problems or there is some other problem why you can not connect to our server. I once heard that the âGreat Wallâ caused problems. Maybe you should talk to your IT admins.
Have you followed this thread:
For the resampling, as long as you donât have the latest modules it might be problematic to resample S2 data.
But in general you can do it.
Using a shapefile to crop the data to a certain area is not easy. In the GUI you can define a geographic bounding box and from the command line you can specify a polygon using WKT. But this will cut out also only the bounding box of the polygon (because images have to be rectangular). You can mask the data afterwards by using the land/sea mask processor.
You will find several examples in the forum how to do this.
Hi,
I tried to resample a S2A image, and after that I tried to compute biophysical indices LAI and APAR and got errors. When, after resampling, I checked the meta data, all the bands shows native resolutions. Please see the screen shot. Why resample did not converted all the spatial resolution to 10 m , any idea? Please help. Thanks.
The image that I had downloaded is S2A_MSIL1C_20170526T172901_N0205_R055_T14TLL_20170526T173505
My main issue is I was not able to compute LAI and fAPAR and the error was the S2MSI bands have different spatial resolution. To make all the bands equal spatial resolution of 10 m I tried to re sample it, but it did not work. How should I overcome this problem and compute LAI?
thanks!
I now see the problem: When performing LAI on a Sentinel-2 image an error message is displayed which is different from the one which is directly leading to the resampling dialogue:
It would be good if any tool led to the second one so resampling could be directly accessed by clicking on âYesâ
@Abdulwasey: You can manually start the resampling tool with Raster > Geometric Operations > Resampling
Here you can define a common resolution for all bands (e.g. 10m).
the above image i can see that the resampling size is define by the pixel size of B2 which is 10m
but if i want to define the resampling by pixel resolution then what i have to do
I have exactly the problem, that the my âresampling/subsetting/export to Geotiffâ-Graph is working if I run it via the Graph Builder in the SNAP 6.0 desktop application, but if I run the same Graph via commandline using gpt I get an error
Error: [NodeId: Write] Product writer is unable to write this product as âGeoTIFF-BigTIFFâ: Cannot write multisize products. Consider resampling the product first.
the attached graph is working if I run it in SNAP 6.0 desktop application (but the band subset is not working?). If I run it via gpt I get the Error from aboveâŚ
Hi,
I have tested your graph and it seems to be working properly here. Could you please execute the command âgpt --diagâ to verify that the version is also the 6.0 when you execute gpt? Perhaps you have an old version of SNAP installed and your path is not updated.