Value of sourceProducts in geosubset.xml for gpt tool?

Reading the guide about bulk processing:


Notice that resample_s2.xml contains
${sourceProduct}
but sourceProduct
is not defined in resample_20m.properties
Also the guide says “In the parameter file the three used parameters are defined.”
but the .properties file shown actually defines 4 (not 3);
however, it should have defined 5 - including sourceProduct.
What would some example values for sourceProduct be???
I assume sourceProduct should be defined in .properties file?
BR
Bjørn

In principle, all the parameters could be passed on the command line. Have a look at the output of gpt -h and you will see:

Arguments:
  <op>               Name of an operator. See below for the list of <op>s.
  <graph-file>       Operator graph file (XML format).
  <source-file-i>    The <i>th source product file. The actual number of source
                     file arguments is specified by <op>. May be optional for
                     operators which use the -S option.
[...]
-P<name>=<value>   Defines a processing parameter, <name> is specific for the
                     used operator or graph. In an XML graph, all occurrences
                     of ${<name>} will be replaced with <value>. Overwrites
                     parameter values specified by the '-p' option.

The .properties file helps to avoid really long command lines with many -P entries. It is generally used for parameters that remain the same for all the files being processed.

1 Like

I have updated the text on the wiki page.
It now says, “the 4 used parameters”.
Thanks for pointing this out.

It is not meaning full to put the source products parameters in the properties file because it changes with each product you process. The parameters in the properties file are constant. So, they can be directly inserted into the graph xml file, but with the properties file it is easy to switch different sets of parameters.

The ${sourceProduct} variable is replaced when the batch script scans the source product directory and then calls gpt.

1 Like

Thanks!
I should probably avoid trying to write the XML by hand. It seems to be better to use the graph builder UI to generate the graph-xml. I now figured out that the sourceproduct refers to previous step-name in graph. I’m still new in this field, so it will take me a while to find the right guides and understanding them. Thanks for helppublictransform_graph.xml|attachment (3.6 KB)