OLCI C2RCC bulk processing

Hello everyone, I am trying to perform C2RCC batch processing on OLCI, but when I created the processDataset.bat file and the parameter file named c2rcc.properties and the c2rcc.xml file, I called the command in cmd but there was no file output.

The source products are located in the directory ‘F:\SNAP_download\Processing\subset\2016\6’ and the XML graph file and the parameter are in the same directory as the batch file. The processed files will go to ‘F:\SNAP_download\Processing\C2RCC\2016\6’ and have the prefix c2rcc

When I use the .xml to process one product of OLCI, the xml file is available, so I think the problem should lie in the .bat file.I looked up a lot of answers in the forums but they didn’t solve my problem. Can someone tell me which step is the problem?, thank you in advance for your help.

Attaching files below:
c2rcc.xml (600 Bytes) c2rcc.properties (133 Bytes)
processDataset.bat (2.2 KB)

Hi
You have hardcoded the path to the xml and the properties, which is fine for you use case, but then you don’t need to provde them anymore on the command line.

What I’ve noticed is that you should remove the ‘/D’, because you specify a file.
Alternatively, you can change the for-loop header to:

for /D /R %sourceDirectory% %%F in (S3*.SEN3) do (

I guess this will work too.

Hi marpet,

Thank you very much for your answer, but I tried to change the content of processDataset.bat to
for /D /R %sourceDirectory% %%F in (S3*.SEN3) do (
Or for /D /R %sourceDirectory% %%F in (S3*.SEN3/xfdumanifest.xml) do (
But still no results are produced in cmd.

My cmd command is:

processDataset.bat c2rcc.xml c2rcc.properties F:\SNAP_download\Processing\subset\2016\6 F:\SNAP_download\Processing\C2RCC\2016\6 c2rcc

I tried changing the command to processDataset.bat c2rcc.xml c2rcc.properties
But still no results.Is there something wrong with one of my steps? Thank you again for your patience!

This is my CMD interface.


This was a bit tricky.

But if you remove the quotes arounf the pathes you have entred then it should work.

set sourceDirectory="F:\SNAP_download\Processing\subset\2016\6"
–>
set sourceDirectory=F:\SNAP_download\Processing\subset\2016\6

Also, the other paths in the loop.
The gptPath variable has those quotes in the original script, but it is used differently. The quotes could be used there, too.

P.S. A funny note:
I tried to translate image
It was translated to: “The order language law is not positively confirmed.”
Which is a nice description of the English: “Syntax error”

1 Like

I think that in the last part of the .bat file, the Main processing, there you have already included the paths to your xml and properties and you do not need to write it again when you run the batch mode.

Hi marpet!

I deleted all the path quotation marks in Command line handling and Main processing(except for the path quotation marks of gpt.exe), but when I enter the cmd command, this time no Syntax error is reported but there is still no result output.

This is my cmd interface and .bat file.



I tried writing the path and not writing the path in the CMD command, but no results were output.
processDataset.bat (2.2 KB)

Hi abruescas.

You mean to enter the following commands in the command line?
processDataset.bat c2rcc.xml c2rcc.properties

I tried the above command, but there is no output. The cmd window is the same as what I said to marpet.I don’t know where the error occurred. Thank you for your kind help!
https://forum.step.esa.int/uploads/default/original/3X/d/a/da744ad273438fbb2206bba39b38f124d66274c0.png

Try this loop header:
for /R %sourceDirectory% %%F in (xfdumanifest.xml) do (
or this one:
for /D /R %sourceDirectory% %%F in (*.SEN3) do (

And please familiarise yourself with the command line.
There are some entry points at the bottom of the wiki page:
Bulk Processing with GPT - SNAP Wiki

Thank you very much, Sir!!!

CMD is finally up and running, but I’m working with a subset of images that have been batch processed in the SNAP software, and there’s no xfdumanifest.xml in the file, which is a bug.

If I want to batch C2RCC for subset images, should I change
for /R %sourceDirectory% %%F in (xfdumanifest.xml) do (
to for /R %sourceDirectory% %%F in (*.img) do ( ?

If you have the results to BEAM-DIMAP you might use:
for /R %sourceDirectory% %%F in (*.dim) do (