Merge icor geotiff outputs


I want to merge the output from iCOR operator over sentinel 2 images. The output are 3 geotiff of 10, 20 and 60 m resolution. I want to resample all S2 bands to 10 m and generate a geotiff file contaning all S2 bands.

The part of resampling to 10m the 20m geotiff and the subsetting and resampling de 60m geotiff is working.However I am not succesing in merging all band into the same file.

Please find enclosed the xml file used to do the tests. If I remove the Merge operator and the last Write operator the subsetting and resampling is accomplished correctly

The error with the xml is:

Error: [NodeId: mergeNode] Product [product3] is not compatible to master product.

If I remove de product3 (from sources and includes) from the Merge operator the error is:

Error: org.esa.snap.core.gpf.OperatorException

Thank you

PD: After solving this issue I will use BandMaths operator to change the band names and to add spectral informations

icor_tiff_merge.xml (4.8 KB)

Maybe the product3 has a different size as the two others. Maybe just by one Pixel. Have you checked the size of the intermediate results?
To fix this you could specify the target width and height for resampling.

When you get the OperatorException there should be a explanatory message. If not could you please run gpt with -e option, and post the full error stack trace.


I do not know exactly why, but after several changes, currently it works. I checked the intermediate products, they had the same size. However I started modifying the xml fixing the target width and height for resampling as you suggest but the problems remained.

After some tests I have added BandMaths operators in order to give to the bands the S2 naming sytle (B01, B02, ….) instead of iCOR geotiff outputs (band_1, band_2 , …), just after gpt Read operators. I have also added a BandMaths operator after Merge operator in order to get the bands in the correct order. I works!!! . Please find enclosed the corresponding xml file. I do not know if the same names for different geotiff iCOR output files could be the problem in my first xml file

Thank you very much!!!


icor_tiff_merge_seg3ok.xml (12.3 KB)