Hello,
I am having issues using the Resample operator provided by Snap.
I want to run a Resampling of about 10% on S1 imagery using ‘Mean’ downsampling and ‘FlagAnd’ flagDownsampling.
The operators works fine if I input my desired width and height and parameters from the desktop application but if I try to run the same operator using GPT tools the result is completely different (much more pixelated).
I use this xml file to call gpt:
<graph id="resample">
<version>1.0</version>
<node id="resample">
<operator>Resample</operator>
<sources>
<sourceProduct>${sourceProduct}</sourceProduct>
</sources>
<parameters>
<!-- <referenceBand>string</referenceBand> -->
<targetWidth>${targetWidth}</targetWidth>
<targetHeight>${targetHeight}</targetHeight>
<!-- <targetResolution>integer</targetResolution> -->
<!-- <upsampling>Nearest</upsampling> -->
<downsampling>Mean</downsampling>
<flagDownsampling>FlagAnd</flagDownsampling>
<!-- <resampleOnPyramidLevels>boolean</resampleOnPyramidLevels> -->
</parameters>
</node>
</graph>
My properties file only contains desired width and height:
targetWidth=modify_this
targetHeight=modify_this
And the command I use with gpt is something like this:
gpt resample.xml -t target_file.dim -f BEAM-DIMAP -p resample.properties -e input_file.dim
Even though my targetWidth and targetHeight are exactly the same as those I input in desktop application the resulting data is very much different (it seems that it ignores the downsampling parameters). Do you have any ideas what might be causing this issue?
Thank you very much in advance for your help.