What I want to do is to subset a Sentinel-2 image, perform some analysis on the subset (e.g. band math) and export the result as GeoTIF.
The first step is to subset the S2 image, taking only bands B6 and B7, both having 20 m resolution. In the Subset Tool window, I specify a ROI based on pixel coordinates.
I select a 20 m band from the reference band list before that of course.
The subset image is not saved as .dim file/product; just opened in SNAP.
Then I generate new band (e.g. MyBand) with Band Maths.
Finally I export MyBand as Geo TIFF. In the Export window I perform only a Band subset (because I need only MyBand, but not B6 and B7). I do not perform spatial subset at that stage because I expect the image is already cropped to my area of interest.
An output image is generated but an error is shown on the lower left corner of SNAP: Unexpected Exception: The specified region, if not null, must intersect with the image’s bounds.
Here are some screenshots of the detailed error message:
And here is the output tiff file opened in QGIS. In the background is the original Sentinel band B6. It can be seen that the upper left corner of the output tiff is aligned well with the area of interest. However the imsge subset should be 3800x2202 pixels while the output tiff is 10980x10980 (i.e. the size of the Sentinel-2 10m bands).
In summary: the spatial subset performed during the first step has no effect during export. Any ideas why this is so?
As a desperate decision, one may want to perform (again) spatial subset during the export. But what turns out is that, somehow, the reference image dimensions are those of a 10 m sentinel band (10980x10980) and you just do not know what values to provide for Scene start/end X/Y. A totall mess.
I am using SNAP 7.