Image shift

hi all
i have built a graph that opens a regular l2a image re-samples, subsets and than calculates some 14 indices. each index is output into a different folder. i than run it in bulk - so it has run 30 times (so in each index folder i have 30 1 band image in big-geotif format (more details on this in Batch procesing). the graph file ill try snap_sentinel_cubic_clip_indices_exports_edited2.xml (18.1 KB) attaching here.

it worked .

i have reviewed the product (which came out as a epsg 32636 geotif) in qgis to overly it with vector data but to my horror - all images are shifted some 14500 meters to the west (can clearly seen in the attached image). this is very weird and i assume its some silly mistake or a bug others have encountered…

anyone knows this problem?

any specific reason why you applied “Resample” instead of the “S2Resampling” operator? The latter is especially designed for Sentinel-2 products. I don’t know if this caused the shift but I recommend using this one to reduce the resampling step as an error source.

grafik

Furthermore, why do you export to GeoTiff? If you write a BEAM-DIMAP product, all metadata is preserved and you can still open the raster (img file inside the \data\ folder) in QGIS or other software because it is ENVI standard and OGC conform.

hi abraun
many thanks for your comments.
i did the re-sample instead of s2 re-sampling for no good reason. when i tried following your suggestion - i get this…

as for the tiff… force of habit i guess… well i checked and sizewise - tiff and beam is the same size. tiff is nice because i get only one file and its easy import into matrix operations.
in any case - saving at a different format didn’t cure the shift…

any more ideas please?

“Invalid S2 source product” sounds suspiciuous. Where did you download the data?

If the format (img vs. tif) is no the cause of the error, you can switch back, of course. I just remember multiple cases when conversion to GeoTiff ruined the product in different ways.

hi
thanks…
i get my images as zip files from the open hub. i j=have worked with them in the past but it was always ok… im going to confirm that by running gdal.
https://scihub.copernicus.eu/dhus/

i tested and like i reported both images (tif and img are shifted).

there mast be something else…

i just checked on snap - the originals are in place. only the products - shifted look at the pic i sent (i am not sure you can see it but the courser on the left is in the middle of the sea)
phuuuu… i thought i needed to download 100 images again…

hi all
just updating that the subset component of my graph caused all the problems and after removing it - everything worked fine, ill have to do the clipping of the product in python o gdal or some other way.
its a shame but what to do???
thanks to all that tried to help
ill be happy to hear from you if you have better solutions…

The solution is, If you save the graph to XML and use it with gpt the processing works if you remove the tag referenceBand .

Source of the post