S2 error in resampling


#1

hi everyone
i’m first time using SNAP and Sentinel 2 data . i have to create subset of the image for this purpose i am re sampling the image but the function is creating error . i read some similar topics related to this problem but problem is still present. i need help to solve this problem.
thanks in advance.
error


#2

How much RAM does your system have? Maybe it is not enough.


#3

I have 12 GB RAM in my system.


#4

@marpet thanks for reply
please also tell me the basic requirements of the system to operate S2 data completely.


#5

This always depends on what you are doing with the data. How many and which operations you are using in your processing chains.
I’m having 16GB and I can do almost everything with Sentinel-2 data.


#6

i wanted to subset S2 image , but it required resampling first i use almost all types of operations for resampling but every time is error occur. now what you think , what should do to solve this problem.


#7

I just tried your use case. I resampled to 10m and tailored the result to a region of 4000x4000 pixels.
I’ve limmited SNAP not to use more than 8GB of RAM and it worked smoothly.
Actually, SNAP never used more than 5GB during the process.
I guess that your SNAP is configured by default also to use 8GB.
So, you could try to increase this value.

In the ‘etc’ folder of the SNAP installation directory you’ll find a file named snap.conf. Open it in a text editor.
There is the line which starts with ‘default_options=’
In this line you’ll find an option like -J-Xmx8G. Increase the value. You could use something like -J-Xmx10G.
If you experience the error on the command line with gpt or pconvert you need to change different files. You need to change the corresponding vmoptions files, either gpt.vmoptions or pconvert.vmoptions. Change the value after -Xmx in the last line.


#8

@marpet thank you for reply. i follow your instruction and go to C:\Users\arehm.snap\etc but i does’t found the file with name snap.conf only three readable files are available as you see in the the pic that i attached with this.


#9

this error is not only in resampling S2 data. i’m also working on S1 data , when i try to do band marge databuffer also create

.
is any possibility to operate SNAP smoothly just like other software like ERDAS


#10

This is the snap user directory you found. :slight_smile:
I was referring to the installation directory.
It should be C:\Program Files\snap


#11

i found that file and change J-Xmx7G To J-Xmx10G but the file does not saved . i restart my laptop and do this again but file does note save .
Capture
I also try to change this in SNAP tools>options>performance but it is not editable.


#12

This is caused by the location of these files under C:\Program Files\ which is protected from editing.
Open the files as an administrator as described below to edit and save them.

https://answers.microsoft.com/en-us/windows/forum/windows_7-security/access-denied-on-editing-file-under-cprogram-files/a3f86105-225c-4ce3-ad73-6e0394184aa7


#13

thanks @marpet and @ABraun for guideline. problem has solved i just increase RAM from 12 to 16 GB and reinstall SNAP.
now it’s all function working properly.