Mosaic batch processing in gpt

Dear members,

I am beginner to SNAP.
I started Downloading multiple s2 data sets using this pycode.
http://olivierhagolle.github.io/Sentinel-download/
After this, I started Resampling of multiple files using batch script provided at
https://senbox.atlassian.net/wiki/spaces/SNAP/pages/70503475/Bulk+Processing+with+GPT
Now, I struck at BandMath and Mosaic of multiple files.
my resample_s2.xml, bandmaths.xml, mosaic.xml are working fine when it run individually.
But, when I combine to all.xml file. Its not working.
Can any body help me to combine these .xml files to all.xml so that, I can run it in operationally in cluster.
my xml files are attached here.

all.xml (2.2 KB)

<graph id="Resample_Sentinel-2">
  <version>1.0</version>
  <node id="resample-s2">
    <operator>Resample</operator>
      <sources>
        <sourceProduct>${sourceProduct}</sourceProduct>
      </sources>
      <parameters>
        <targetResolution>${resolution}</targetResolution>
        <upsampling>${up}</upsampling>
        <downsampling>${down}</downsampling>
        <flagDownsampling>${flag}</flagDownsampling>
        <resampleOnPyramidLevels>false</resampleOnPyramidLevels>
      </parameters> 
   </node>
</graph>

  <graph id="someGraphId">
      <version>1.0</version>
          <node id="someNodeId">
                <operator>BandMaths</operator>
                  <sources>
              <sourceProducts>${sourceProducts}</sourceProducts>
                  </sources>
    <parameters>
          <targetBands>
                    <targetBand>
    <name>sateesh</name>
             <type>float32</type>
                 <expression>B2+B3</expression>
                   <description>string</description>
         <unit>string</unit>
       <noDataValue>0</noDataValue>
    </targetBand>
                   </targetBands>
      </parameters>
  </node>
</graph>


<parameters>
    <variables>
        <variable>
            <name>band_1</name>
            <expression>band_1</expression>
        </variable>
        <variable>
            <name>variable_1</name>
            <expression>band_1 + 400</expression>
        </variable>
    </variables>
    <combine>OR</combine>
    <crs>GEOGCS[&quot;WGS84(DD)&quot;,
      DATUM[&quot;WGS84&quot;,
        SPHEROID[&quot;WGS84&quot;, 6378137.0, 298.257223563]],
      PRIMEM[&quot;Greenwich&quot;, 0.0],
      UNIT[&quot;degree&quot;, 0.017453292519943295],
      AXIS[&quot;Geodetic longitude&quot;, EAST],
      AXIS[&quot;Geodetic latitude&quot;, NORTH]]</crs>
    <orthorectify>false</orthorectify>
    <elevationModelName>SRTM 3Sec</elevationModelName>
    <resampling>Nearest</resampling>
    <westBound>71.53906406018703</westBound>
    <northBound>34.39134315514452</northBound>
    <eastBound>84.56070695099831</eastBound>
    <southBound>21.455183699523616</southBound>
    <pixelSizeX>0.05</pixelSizeX>
    <pixelSizeY>0.05</pixelSizeY>
</parameters>

Thank you.

The problem is that you simply put together all graphs in one file you need to create one graph in one file. And you haven’t added a mosaic node only it’s parameters.
I suggest that you have also a look at this page:
https://senbox.atlassian.net/wiki/spaces/SNAP/pages/70503590/Creating+a+GPF+Graph

A step in the right direction would be the following graph. Probably it is not yet fully functional but it gives some hints.
all.xml (2.8 KB)

This way only a single product will be mosaicked. I’m not sure if this is what you intend. If you want to mosaic multiple products then you should first do the resampling and band maths with one graph on all products and afterwards you do the mosaic with another graph.

Yes, my all.xml is missing the graph structure.
Resampling and band maths are working well.
thanks for your help.
Now, I need to create another graph for mosaicing. In this how do I replace NaN with the missing track.
snapshot is attached here.

you can open the raster properties and choose a NoData value. Just read which value is stored in the white areas and enter it in the NoData field. It won’t be displayed any longer.

Thank you ABraun. Its worked fine.
my missing area field value is 6.5535001754761.
Now, How can I add this in my mosaic.xml graph ?

mosaic.xml (935 Bytes)

This can’t be added to the mosaic. You need to add this to your input bands, your ‘sateesh’ bands.
If the input has proper no-data values or expression assigned it will be considered in the mosaic.
How do you create the sateesh bands? maybe valuable information gets lost.