When running StatisticsOp
(write as xml
and then run using gpt
) for one band with two different masks, the two resultant statistic files are identical. the result for the first call of StatisticsOp
is correct, while the 2nd is not. Any one could help?
Note: this is a recently found issue, seems after my upgrade of SNAP in the last few months.
For example , the graph below will give two same resultant file “outfile1.txt” and “outfile2.txt”; “outfile1.txt” is correct, while outfile2
.txt is not.
<graph id="StatisticGraph">
<version>1.0</version>
<node id="Read">
<operator>Read</operator>
<sources/>
<parameters>
<file>path-to-dim-file</file>
</parameters>
</node>
<node id="StatsNode1">
<operator>StatisticsOp</operator>
<sources>
<sourceProducts>Read</sourceProducts>
</sources>
<parameters>
<bandConfigurations>
<bandConfiguration>
<sourceBandName>band1</sourceBandName>
<validPixelExpression>Mask_band1</validPixelExpression>
</bandConfiguration>
</bandConfigurations>
<outputAsciiFile>outfile1.txt</outputAsciiFile>
<accuracy>5</accuracy>
</parameters>
</node>
<node id="StatsNode2">
<operator>StatisticsOp</operator>
<sources>
<sourceProducts>Read</sourceProducts>
</sources>
<parameters>
<bandConfigurations>
<bandConfiguration>
<sourceBandName>band1</sourceBandName>
<validPixelExpression>Mask_band2</validPixelExpression>
</bandConfiguration>
</bandConfigurations>
<outputAsciiFile>outfile2.txt</outputAsciiFile>
<accuracy>5</accuracy>
</parameters>
</node>
</graph>