Hello everyone, I’m a bit lost on what I am doing wrong with my xml code. I work on a Linux machine.
I want to merge daily images over my area of interest, having the same date (YYYYMMDD). For example “MERxx20030303x14x” and “MERxx20030303x15x”. Their names are saved in a variable named inputfilenames, for example :
/WhereMyDataAre/MERxx20030303x14x,/WhereMyDataAre/MERxx20030303x15x
I save them in an outputfilename format I define in my bash code. I did it with the GUI and everything works as I expect.
Then, I use the gpt command line :
gpt /myXmlFilesDirectory/MultiMoza.xml $inputfilenames -t /WhereIWantMyDataSaved/$outputfilename
with my MultiMoza.xml containing the following code : MultiMoza.xml (2.4 KB)
I get the following error :
Error: [NodeId: inserted–ProductSet-Reader–0] Specified ‘file’ [$inputfilenames] does not exist.
Even with only one image a day, it doesn’t work. Even if I write the exact /path/name of the daily image I want in the $inputfilenames, in the ProductSet-Reader operator, it doesn’t work.
I’m not sure if the Productsset-reader works with multi-size mosaic operator. But you should change the command line call. But if it works in the GraphBuild it should also work on the command line.
Hello, thanks for the answer, I tried the three solutions :
With @falahfakhri 's solution removing the $input in the productset reader :
Error: ProductSet-Reader fileList is empty
With @marpet 's first solution (with -Pinputfilenames=) :
Error: [NodeId: inserted–ProductSet-Reader–0] Specified ‘file’ [$inputfilenames] does not exist.
With @marpet 's second solution (in the Multi Mosaic’s source product, still with -Pinputfilenames=) :
Error: Missing source ‘$inputfilenames’ in node ‘Multi-size_Mosaic’
It seems that the value you provide on the command line is not correctly evaluated
What happens if you rename your variable to e.g. inputs or replace it directly with you paths?
For example, in this post I showed the usage of variables and that it should work in general.
Where do you specify ‘mypath/Mydata’? There you need to specify the proper path. Somehow you don’t pass the right path to the command line.
But as this new message indicates the variable ‘$inputfilenames’ within the XML file is replaced.
Can someone try to do a mosaic with my code and a random image to see if it works with the corrections from @marpet or if something needs to me modified again ?
I tested your graph in the example wiki (creating a graph) to check if a basic graph worked. It works.
Then I adapted it to my graph. It works, except that I can’t create my output filename as I desire.
However, it saves the products with the name written inside the xml file at the line “file” of my Write node, even if it’s a variable with a $. It’s strange because it works for the input filename. Also, it saves it in the bin directory, even if I specify a folder.
Any idea @marpet ? Do I have to create a new xml each time I want a new outputname ?
Cheers
Edit : Also, adding the -Pinputfilenames= was the problem, I just write my command line as gpt /xx/X.xml -t output file1 file2.
The -t output isn’t working, that’s my precise question
Okay I followed the explanations given by @maxkoenigGpt option -T<target> and -P<target> not working in S1TBX and removed the “write” node from my grph and now the output works as expected. It was the same problem with the “-Pinputfilenames=” who didn’t work with one file because the file was never read, which explains the previous error message I got. I tried with 2 files and only the second one was applied, then without -Pin… it works fine.
I would still like a proper explanation, but it works at the moment if we adapt.