Is it possible to call ProductSet-Reader using gpt?


I have developed a number of data processing pipelines using gpt and making calls back to the system for the various processing commands. This has always worked fine for me until recently. I have a pipeline that requires taking multiple S1 subswaths and combining them back together after backGeocoding, ESD, and Deburst. I can do this in the GUI using the products I created and ProductSet-Reader to create the product set, followed by a call to TOPSAR-Merge. However, when I try to do this using gpt I get

Error: Please add a source product

I have found a number of posts on this forum related to this or similar errors, but no one seemed to have an answer for how to get around this in gpt. A couple of notes:

  • I am using the latest version (version 6 ) of S1TBX on CentOs Linux
  • I suspect I should be using xml graphs and perhaps this would fix my issue, but my pipeline is rather complex and I’d rather not go rebuild everything right now.

Here is a simple example using gpt that generates the error.

~/snap/bin/gpt ProductSet-Reader -t ./product-set.dim -PfileList=/home/sarko/NevDem-166/temp/S1A_IW_SLC__1SDV_20160924-20160930-IW1/S1A_IW_SLC__1SDV_20160924T014240_20160924T014316_013188_014F92_8BE5_TS_OB_BG_ESD_INT_DB.dim,/home/sarko/NevDem-166/temp/S1A_IW_SLC__1SDV_20160924-20160930-IW2/S1A_IW_SLC__1SDV_20160924T014240_20160924T014316_013188_014F92_8BE5_TS_OB_BG_ESD_INT_DB.dim

You can see I am using the -PfileList option, which is specified in the gpt help for ProductSet-Reader. I have tried enclosing the file list in “”, {}, and ‘’ to see if this helped and it did not. I have also tried specifying source products using -Ssource and just appending them to the gpt call. Those did not work either.

It seems odd that in the gui it works fine, but not using gpt. I am hopeful I am just calling it wrong. Thank you for any help you can offer.


Hi Scott,

did the ProductSet-Reader ever worked with gpt?
When I look at the implementation I would say no. There are only special treatments in the Graph Builder and Batch Processing in the SNAP Dektop.
Maybe @lveci can say how this should work or to accomplish this task on the command line.

You should be able to run a graph containing ProductSet-Reader with gpt.
In the graph, it should have a node like this

<node id="ProductSet-Reader"> <operator>ProductSet-Reader</operator> <sources/> <parameters> <fileList>$filelist</fileList> </parameters> </node>

where fileList could be a path to a folder or a comma separated lists of paths master,slave,slave,etc

The ProductSet-Reader is there for convenience. It just substitutes its node with a list of several readers. For this reason, it should only be used within a graph such as for coregistration where the following operators would take multiple source products as input and do something with them.

I have to report an old problem about it : when running a pipeline with ProductSet-Reader in the graph , directly from the GUI there is no problem, but someone wants to use gpt and run the pipeline calling its xml file, there is an error output unless the ProductReader nodes are moved at the beginning of the xml file.

Thanks we’ll look into this.

Thank you to everyone for your comments. Based on some forum searching it appears that ProductSet-Reader has maybe never worked quite right using gpt directly. However, based on lveci’s response I was able to encapsulate the portion of the processing I need it for into a pretty simple graph.xml file and I just run that for the portion I need. I can definitely see the benefit of the graphs and will probably port my pipeline to it in the future. Thank you again. I very much appreciate everyone taking the time to respond.