Bulk pixel data extraction problem

Dear SNAP community,

Processing L1 OLCI match ups in the command shell, I faced with a problem with a pixel data extraction

My goals are:

  1. Subset region with shipboard data
  2. Run C2RCC
  3. Extract pixel values

I used this guide as a tutorial and overcame the first two steps
https://senbox.atlassian.net/wiki/spaces/SNAP/pages/70503475/Bulk+Processing+with+GPT

Further, I added the “Extraction” node (I filled the prompt from $gpt pixex -h)
The problem with this node is that it returns pixel values from only one file

The *productIDMap.txt content is:
# Product ID Map
ProductID ProductType ProductLocation
0 C2RCC_OLCI Not saved to disk [c2rcc]

Indeed, the code ceases saving subset files after adding the “Extraction” node

My solution is to get pixel values using GUI after bunch subsets and C2RCC calculation. It works, but seems to be ‘unprofessional’

I am quite new in SNAP bunch processing, so maybe the mistake is trivial. Anyway, I will appreciate any help

processDataset.bash and subset_c2rcc_pixex.xml are in attachment

Best regards,
Dmitry
processDataset.bash (1.7 KB) subset_c2rcc_pixex.xml (2.0 KB)

Hi, I send you attached my .xml, it worked.
I made a few changes on your .xml (I used all coordinates instead of a txt file with all the points), but I think that probably what was not working is simply this: you have to change “sourceProducts>c2rcc</sourceProducts” by “sourceProduct>c2rcc</sourceProduct”
subset_c2rcc_pixex.xml (4.4 KB)

Oh, and I used S2-MSI.

2 Likes

Dear Ana,
Thanks for your reply.

I’ve changed that line and added /home/glu/SNAP_OLCI/AMK69/subsets_test/ to the PixEx section

The problem is the same: PixEx overwrites its output with every input file; *productIDMap.txt says that the product file has not been saved to disk

And C2RCC output does not appear in the output folder which I directly set in the shell file:
targetDirectory="/home/glu/SNAP_OLCI/AMK69/subsets_test/"

Without PixEx node script saves C2RCC output in the specified directory
Why does this node interrupt processed subsets saving?

Is it possible to set a direct output folder in c2rcc.olci node?
May it help?

Thanks again for your time and help

Best regards,
Dmitry

I will take a look when possible, in the meantime you should consider the possibility of running C2RCC and the using PixEx in the GUI. If you import the list of all your C2RCC outputs, you can extract everything in one go with PixEx in SNAP and have all data in one file. I am not sure if this is what you want, but the name of the product of each extraction is included in the csv file, it won’t be very difficult to separate later (if needed).

1 Like

Thanks for your comment
I do what you suggest, it works and is fine for me =)
The idea was to make everything without GUI

Best,
Dmitry

Hey there! I stumbled upon this old thread and saw that you were having some trouble with bulk processing in SNAP. I’m not an expert, but I’ve had some experience with it before, and I might be able to help you out. Have you tried adding a loop to your script to iterate through each file and extract the pixel values using the Extraction node?

Dear Charlotte,
Thank you very much for your response.
Currently, I have ceased to engage in tasks related to working in SNAP. I will contact you if I have any questions.
Thanks again.
Best regards,
Dmitry