In Tools->Options->S1TBX you can check “Use file cache in readers to conserve memory”. If you .snap cache folder is on an SDD you won’t notice it too much otherwise it may be slower but it will avoid this.
rg.esa.snap.core.gpf.OperatorException: Terrain-Correction: Java heap space
at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:386)
at org.esa.s1tbx.sar.gpf.geometric.RangeDopplerGeocodingOp.computeTileStack(RangeDopplerGeocodingOp.java:1038)
at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeRect(OperatorImageTileStack.java:116)
at org.esa.snap.core.gpf.internal.OperatorImageTileStack.computeTile(OperatorImageTileStack.java:85)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
Caused: org.esa.snap.core.gpf.OperatorException: Terrain-Correction: Java heap space
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 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:420)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:406)
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)
I am using 4GB memory… i have changed the settings in folder(C:\Users\shalini.snap\etc\snap) #SNAP configuration ‘snap’ #Mon Jan 25 11:29:49 IST 2016
s1tbx.readers.useFileCache=true
true=
snap.cachedir=C:\Users\shalini\.snap\var\cache
-Dsun.awt.nopixfmt=true
…=
false=
snap.jai.defaultTileSize=512
-Dsun.java2d.noddraw=true
snap.jai.tileCacheSize=1024
snap.pixelGeoCoding.fractionAccuracy=false
snap.parallelism=4
snap.gpf.disableTileCache=
-Dsnap.gpf.disableTileCache=false
-Xmx3000m=
-Xms1000m=
snap.worldwind.useFlatEarth=false
snap.gpf.useFileTileCache=
-Dsnap.gpf.useFileTileCache=true
-Dsun.java2d.dpiaware=false
-Xverify=none
snap.adjustPinGeoPos=true
-Dnetbeans.mainclass=org.esa.snap.main.Main
-XX=+AggressiveOpts
You should increase the amount of RAM in your system, it is unlikely that 4GB will be enough even if the settings are tweaked. In order to properly benefit from more memory you should have a 64-bit operating system.
I got an issues thatI think may be related.
when running python3 code with snappy commands I get the following error after trying to write out a Sentinel 1 image that I read in just prior:
This happens on a server linux system (w/o gui) while I do not have the issue with the same data and code on a windows system, which makes me think it is an installation problem.
How to trace it? Could it be memory? OR something related to the java install?
Thanks for your feedback. Mark
thankyou this setting helped me a lot i was not able to open amplitude_vv and amplitude_vh image together my system freezes out. thanks your method helped me
Hello,
I have a similar problem with snappy.
I would calibrate S1 images using snappy. My script is below.
But, I have always this memory problem:
Traceback (most recent call last):
File “S1_calb_test.py”, line 40, in
ProductIO.writeProduct(target_0, calib, ‘BEAM-DIMAP’)
RuntimeError: java.lang.OutOfMemoryError: Java heap space
I have replaced 4G by 16G in snappy.tni and jpyconfig.py, but I steel have the same problem.
Thak you
import snappy
from snappy import ProductIO
from snappy import HashMap
import os, gc
from snappy import GPF
GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis()
HashMap = snappy.jpy.get_type(‘java.util.HashMap’)
path = “/home/ndjamai/job/S1_data_dim/”
for folder in os.listdir(path):
gc.enable()
inputpath = path + folder + “//”
timestamp = folder.split("_")[4]
date = timestamp[:8]
sentinel_1 = ProductIO.readProduct(inputpath + “manifest.dim”)
pols = [‘VH’,‘VV’]
for p in pols:
polarization = p
Hello . I installed SNAP on Windows 64bit and when I start it I got this…
Unable to initialize WWWorldMapToolView: C:\Users\PC\AppData\Local\Temp\jogamp_0000\file_cache\jln3300562820007656362\jln347129495556353983\gluegen-rt.dll: Accesso negato
A java.lang.UnsatisfiedLinkError exception has occurred.
Click Show Details or see the messages.log file located in your C:\Users\PC\AppData\Roaming\SNAP\var\log folder.
java.lang.UnsatisfiedLinkError: C:\Users\PC\AppData\Local\Temp\jogamp_0000\file_cache\jln3300562820007656362\jln347129495556353983\gluegen-rt.dll: Accesso negato
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:530)
at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64)
at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:96)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:414)
at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:388)
at com.jogamp.common.os.Platform$1.run(Platform.java:209)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.common.os.Platform.(Platform.java:179)
at javax.media.opengl.GLProfile.(GLProfile.java:83)
at gov.nasa.worldwind.Configuration.getMaxCompatibleGLProfile(Configuration.java:658)
at gov.nasa.worldwind.Configuration.getRequiredGLCapabilities(Configuration.java:671)
at gov.nasa.worldwind.awt.WorldWindowGLCanvas.(WorldWindowGLCanvas.java:96)
at org.esa.snap.worldwind.AppPanel.(AppPanel.java:69)
at org.esa.snap.worldwind.WWBaseToolView.createWWPanel(WWBaseToolView.java:54)
[catch] at org.esa.snap.worldwind.WWWorldViewToolView$1.doInBackground(WWWorldViewToolView.java:116)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Have you checked if you have read/write access to the file C:\Users\PC\AppData\Local\Temp\jogamp_0000\file_cache\jln3300562820007656362\jln347129495556353983\gluegen-rt.dll
and the parent directories?
“Accesso negato”, sounds like you do not have the permission for whatever reason.
Was SNAP installed by a different user account with admin rights?
I had previously changed the following files: # java_max_mem: 16G in snappy.ini jvm_maxmem = ‘16G’ in jpyconfig.py
but received either the error reading metadata or one indicating a memory issue. Checking “Use file cache in readers to conserve memory” resulted in a successful output. Thanks!
When performing the radiometric correction, having the “Open in SNAP” tab, when the process is finished, it does not appear on the board as it should be.
The error of the image appears when trying to visualize VV, something that does not happen with HV, it happens the same with archives of different dates.
I am using Sentinel 1B files, in a 64-bit Windows 10 and the latest version of SNAP (SNAP 6.)
I would appreciate any comments about it. Greetings.
java.io.FileNotFoundException: F:\subset_0_of_S1B_IW_GRDH_1SDV_20171211T104214_20171211T104239_008670_00F691_F37A_Cal.data\Sigma0_VV.img (El sistema no puede encontrar el archivo especificado)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(Unknown Source)
at java.io.RandomAccessFile.(Unknown Source)
at javax.imageio.stream.FileImageInputStream.(Unknown Source)
[catch] at org.esa.snap.core.dataio.dimap.DimapProductReader.getOrCreateImageInputStream(DimapProductReader.java:379)
at org.esa.snap.core.dataio.dimap.DimapProductReader.readBandRasterDataImpl(DimapProductReader.java:314)
at org.esa.snap.core.dataio.AbstractProductReader.readBandRasterData(AbstractProductReader.java:250)
at org.esa.snap.core.image.BandOpImage.computeProductData(BandOpImage.java:67)
at org.esa.snap.core.image.RasterDataNodeOpImage.computeRect(RasterDataNodeOpImage.java:127)
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 javax.media.jai.PlanarImage.getData(PlanarImage.java:2085)
at org.esa.snap.core.image.VirtualBandOpImage.addDataToReferredRasterDataSymbols(VirtualBandOpImage.java:309)
at org.esa.snap.core.image.VirtualBandOpImage.computeTile(VirtualBandOpImage.java:235)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
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.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.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.PointOpImage.computeTile(PointOpImage.java:962)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.RenderedOp.getTile(RenderedOp.java:2257)
at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:247)
at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)