Absolute band names in GPF XML for GPT

I am trying to apply a GPF XML processing workflow to S1A_IW_GRDH_1SXX… data containers, but the different polarisations are causing issues because the ‘band names’ are hard coded into my bandExpression. For example;

<node id="BandMaths">
      <sourceProduct refid="LinearTodB"/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <bandExpression>if Sigma0_VH_db &gt; $thresh_Sigma0_VH_db and Sigma0_VV_db &gt; $thresh_Sigma0_VV_db then NaN else 1</bandExpression>

Is there a mechanism for passing ‘relative’ band names in the bandExpression?

For other operators leaving <sourceBands/> with no value appears to default to all bands in an image and for other image specific arguments I am dynamically generating and using the $argument constructor in the generic GPF XML, for this case I am considering dynamically replacing the XML node, but I wanted to check in case I missed something and there was a simpler solution.

Any tips appreciated.

cheers Ed.

You can define your own parameter to the xml file. It is similar to your usage of $argument.

When invoking it from the command line you can specify -Pband_1=Sigma0_VH_db
And then using in the expression
if ${band_1} &gt; $thresh_Sigma0_VH_db and Sigma0_VV_db &gt; $thresh_Sigma0_VV_db then NaN else 1
Before the graph is executed the variable ${band_1} is replaced by the value given on the command line.
You could also do


And on the command line specify -PMyExpression=Your actual expression

- Marco

Thanks Marco, ${MyExpression} looks like a neat solution.