S2 Resampling on a subset not supported?

For me the processing looks like this:


And this seems to be correct.
The subset is only 1098x1098.
This is specified in the graph:

    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <sourceBands>B2,B3,B4,B5,B6,B7,B8A,B11,B12</sourceBands>
      <region>0,0,1098,1098</region>
      <referenceBand/>

Dear Marco,

It’s correct and Not correct!, Correct, because technically the operator runs smoothly without any error,
and not correct, because I just found applying subset directly out of *,xml resulting subset the required bands, and keeping the size of the image as you can see below,
image

However, applying subset (for bands) within *.xml leads to subset the image or required band, because the number you referred to within the *.xml I provided to you

Is essentially within the operator as default number, following is another *.xml file has only three operators read, subset and write, as you can see, the number 1098 is already available as default,

Hope to correct this, to be the whole size of the image, and works exactly same to the subset operator from main tab raster.

Also this is the original size of each bands in the original image,

image

When resample to 20, and then subset the required band the operator shouldn’t take the size of the bands for instance 10 m, NOROW, NCOLS, or decrease the size accordingly to be applied and affected the real size of the image!

This opinion is out of the scope of this problem, and general,

If you remember in my last visit to ESRI, my opinion was to improve the SNAP already exist instead of adding more options and operator, delay is better than error.

Okay, no I understood the issue.
It is a problem of the UI.
When selecting a reference band, the width and height are not updated accordingly. The GUI should validate if the entered coordinates [x,y,w,h] if they are valid for the reference band.
Another issue is that the resampler always starts with a target resolution of 100m. This is where the 1098 is coming from (10980 at 10m → 1098 at 100m). Once the target resolution is set the following subset operator is not notified if the resolution is changed to e.g. 20m. And this results in the error you observe.

Currently you can only lookup the resampled size of your product and provide this manually for the width and height parameter

I’ve created two issues for this:
[SNAP-1501] Subset parameters not correctly update in Graph Builder - JIRA (atlassian.net)
[SNAP-1502] Change in resampling parameters is not propagated in Graph Builder - JIRA (atlassian.net)

I fully support this. But there are also other requirements which need to be served.

1 Like

Has there been any movement on this issue @marpet ?