Command-line automatic coregistration with gpt

Dear All,

I want to use the “Automatic Coregistration” within the command-line to register calibrated and range-doppler terrain corrected Sentinel-1A Scenes under Windows 7.

There are basically 5 steps:

Using those commands with gpt always gives an error, probably because they should
be somehow connected.
I also created and checked an XML-File with the Desktop Application, but in the command line
the WriteOP gave an error.

Is there any way to make the Automatic Coregistration work in the command-line, preferably without XML??
Otherwise what is wrong with the XML-File (posted below) that worked in the Desktop Software but not
in the command-line?

Thanks in advance and best regards!

<graph id="Graph">
  <node id="CreateStack">
      <sourceProduct.2 refid="ProductSet-Reader"/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
  <node id="GCP-Selection">
      <sourceProduct refid="CreateStack"/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
  <node id="Warp">
      <sourceProduct refid="GCP-Selection"/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <interpolationMethod>Bilinear interpolation</interpolationMethod>
  <node id="Write">
      <sourceProduct refid="Warp"/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <file>C:\Program Files\snap\coregistered_stack.tif</file>
  <node id="ProductSet-Reader">
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <fileList>C:\Program Files\snap\S1A_input1.tif,C:\Program Files\snap\S1A_input2.tif</fileList>

If you put those operators in a graph and run it in the GUI, does it work? If you run all the steps sequentially you will suffer a large performance decrease due to the extra reading and writing of intermediate products.

It works in the GUI and I also created the XML with the Graph-Builder, but in the command-line the same XML gives the error: “Operator ‘WriteOp’: Mandatory source product not set”.
However it would be best just to use the gpt operations without an XML, if it is possible.

The Graphs are in XML - why do you want to avoid XML?

I know but you can also use the direct commands like

gpt ProductSet-Reader -PfileList=…
gpt CreateStack [options] …

I’d prefer that but XML also works.

Anyway I would like to know how to make the automatic coregistration work in the command-line,
with or without XML.

maybe this post helps: Absolute beginner's guide to GPT

If you use the graph xml the processing will be faster because the intermediate results do not need to be written to the disk and read in again. Also some operators need to be called via a graph because the parametrisation is to complex for the command line.

I’d like to add that the performance benefit is generally large, even with SSD disks (highly recommended) many operations spend 90% of their time doing I/O.

Thank you for your help and your replies, but my question was related to the automatic coregistration. Anyway I think I figured it out now. Thanks again.

Hi, I have run into the same problem. Can you please tell me how you solved this problem?

I have solved it be re-arranging the operators in the XML file. Thanks.

I had the same issue, and moving up the “ProductSet-Reader” node as upper node of the .XML file solved it.

Hey marpet,
This thread is old, but I am interested in which processes need to be called in a graph? Since I am trying to automate stuff for work I am wondering if it even makes sense.

Please take a look at Bulk processing with gpt

Source :

Thank you I will have a look!