Resampling via Command Line

Hey!
I am currently trying to resample multiple data sets in order to subset them with a polygon later. My goal is to do this using the CMD interface of snap.
However, something seems wrong in my code…

I created this XML file:


Then I opened the cmd and entered: gpt “C:…\resampling.xml”
The resulting error: Error: Missing source ‘‘G:\S2A_USER_PRD_MSIL2A_PDMC_20160212T192856_R065_V20160212T102135_20160212T102135.SAFE\S2A_USER_MTD_SAFL2A_PDMC_20160212T192856_R065_V20160212T102135_20160212T102135.xml’’ in node ‘Resampling’

I am probably missing out something very basic, but I would be very happy to get some help here. Some more detailed documentation of the usage of the Snap command line would also be extremely helpful.

Cheers

Nobody had issues with the command line before??? I’d be glad for any suggestion!

Hi,

i think it is needed a previous node in your graph to read the data and a final one to write the output. Something like this:

You can generate the xml in SNAP Desktop: Tools->Graph Builder.

Or provide the path to the source product on the command line and not in the graph. This would make the graph also reusable.

<sources> <sourceProduct>${s2Product}</sourceProduct> </sources>

And on the command line write gpt ... -Ss2Product=<path>

But actually also the path within the xml should work. I will note this as an issue.