SNAP error


#21

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


#22

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

  ### CALIBRATION
  output=inputpath+'CALIBRATION/' 
  parameters = HashMap() 
  parameters.put('outputSigmaBand', True) 
  parameters.put('sourceBands', 'Intensity_' + polarization) 
  parameters.put('selectedPolarisations', polarization) 
  parameters.put('outputImageScaleInDb', False)  
  calib = output + date + "_calibrate_" + polarization 
  target_0 = GPF.createProduct("Calibration", parameters, sentinel_1) 
  ProductIO.writeProduct(target_0, calib, 'BEAM-DIMAP')

#23

Please check if you changed the right one.
Add at the beginning of your script the following line

print('snappy.__file__:', snappy.__file__)

The path of the __init__.py file is printed, the snappy.ini file is located next to it.


#24

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)

WHAT CAN BE RELATED ?


#25

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?


#26

Hi Iveci, Thank you for posting this, the solution worked for me in terms of the following error:

Traceback (most recent call last):
File “E:\Models\python_Scripts\SNAP_PythonTest.py”, line 26, in
ProductIO.writeProduct(sceneIn, fileOut, “BEAM-DIMAP”)
RuntimeError: java.lang.RuntimeException: javax.imageio.IIOException: I/O error reading image metadata!

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!


#27

Greetings.

Friends, the following happens to me:

  1. 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.

  2. 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.

Here is the complete message.

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)


#28

It seems that the file which shall be read does not exist. have you moved the *.dim file to another place without moving the *.data directory too?


#29

2 posts were split to a new topic: Unable to initialize WWWorldMapToolView


#30