Snappy.ini not found: make new one?

Hello,

I am having java heap space problems when I try to process S1 data, and am looking to modify the snappy.ini file, but there does not seem to be an .ini file in the snappy folder. Is there someplace else to look? Should I be making it myself?

Thanks

Yes, you can try to create a new one.
Use this as template.

[DEFAULT]
snap_home = C:\PROGRA~1\snap
java_max_mem: 4G
# snap_start_engine: False
# java_class_path: ./target/classes
# java_library_path: ./lib
# java_options: -Djava.awt.headless=false
# debug: False

You probably need to update the path to the snap_home.
But if you lost this file, there might be more broken things.
If you still experience problems. Consider reinstalling snappy.
Go to bin folder of snap installation and execute snappy-conf.

1 Like

i also have the same issue as mentioned in earlier post…i couldn’t find the snappy.ini file in order to increase the space. i was also trying snappy.conf

I am new to snap…please kindly give me step by step procedure to avoid java heap space error. and i am not familiar with snappy and python related issue. i am trying hard to understand it by reading many posted related to this, i could understand anything related to snap desktop application but not about the snappy and other commands.

Thanks in advance

  1. Ensure that SNAP is installed
  2. Open your command line (cmd)
  3. Move to your SNAP installation
    cd C:\%SNAP%\bin
    e.g. cd C:\GIS\SNAP\bin
  4. Configure the bat-file
    snappy-conf.bat %PYTHON%
    where %PYTHON% is the full path to your python.exe
    e.g. snappy-conf.bat C:\Python27\python.exe
  5. This creates a hidden folder in your user directory called .snap
  6. Open the folder .snap\snap-python\ in your browser and copy the folder snappy into the site-packages folder of your python installation
    e.g. C:\Python27\Lib\site-packages\snappy
  7. Open your Python environment
    import snappy (this imports the module and should now give no error)
2 Likes

Many thanks for your reply @ABraun … I have changed the default java memory space to 9G(in snappy notepad file) … As of now, i could process sentinel 1 data in snap without java heap space error…

Hi marpet. Can you explain the variables commented into .ini file? What is the flag “debug”?

You are probably referring to __init__.py, right?
The debug variable, if set to True, enables some extra print messages and debugging information.
Further down in the file you see that the variable is checked and something special is done if it is True.

No, I was refered to snappy.ini configuration file. The flag debug.

I’m having problems with debugging my python code right now.

Ah, okay. This is actually the same. The __init__.py (line 55, 56) reads the values from the snappy.ini file.