Stitching of same UTM zone granules

Discussion of your results and ACOLITE in general
Post Reply
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Stitching of same UTM zone granules

Post by quinten »

As of ACOLITE version 20170619.0 separate Sentinel-2A granules from the same overpass and same UTM zone can be stitched together automatically. Due to the IDL file selector widget used in the GUI this can only be done using batch mode processing using the command line.

You will need:
- a settings file containing your region of interest and processing options, this can be exported from the ACOLITE GUI: acolite_settings.cfg
- a list of the tiles you want to stitch: tiles.txt

In a terminal or the Windows command prompt, change directory to the ACOLITE directory, and run the batch mode command with merge_tiles=1 keyword. For example for linux:
idl84/bin/idl -rt=acolite.sav -args settings=acolite_settings.cfg image=tiles.txt run=1 merge_tiles=1
Please not that the full path to the settings file and image list needs to be provided. The image list file needs to contain the full path to the individual .SAFE files as well.
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: Stitching of same UTM zone granules

Post by quinten »

As an example, let's process the Sentinel-2A overpass over Morecambe Bay on the 25th of May. I have downloaded 4 tiles covering the bay (T30UVE, T30UVF,T30UWE,T30UWF), and saved them in a specific location. Using a text editor I create the file 'Morecambe_tiles.txt' with on new lines the full path to each tile:

Code: Select all

/home/quinten/Sentinel-2/Data/30UVE/S2A_MSIL1C_20170525T112121_N0205_R037_T30UVE_20170525T112434.SAFE
/home/quinten/Sentinel-2/Data/30UVF/S2A_MSIL1C_20170525T112121_N0205_R037_T30UVF_20170525T112434.SAFE
/home/quinten/Sentinel-2/Data/30UWE/S2A_MSIL1C_20170525T112121_N0205_R037_T30UWE_20170525T112434.SAFE
/home/quinten/Sentinel-2/Data/30UWF/S2A_MSIL1C_20170525T112121_N0205_R037_T30UWF_20170525T112434.SAFE
Using the ACOLITE GUI I specify an output directory and the region of interest (South 53.9399 North 54.2508 West -3.22040 East -2.77750) and click save to generate a settings file 'Morecambe_settings.cfg'. In a terminal window I change directories to the acolite_linux directory, and run the batch command:

Code: Select all

cd /home/quinten/acolite_linux
idl84/bin/idl -rt=acolite.sav -args settings=/home/quinten/Examples/Morecambe_settings.cfg image=/home/quinten/Examples/Morecambe_tiles.txt run=1 merge_tiles=1
When using the merge_tiles keyword I get a merged output product:
S2A_MSI_2017_05_25_11_21_merged_tiles_UTM30_RGB_RCO_LINEAR_map_small.png
S2A_MSI_2017_05_25_11_21_merged_tiles_UTM30_RGB_RCO_LINEAR_map_small.png (171.2 KiB) Viewed 7809 times

Without the merge_tiles keyword the granules are processed separately:

Code: Select all

cd /home/quinten/acolite_linux
idl84/bin/idl -rt=acolite.sav -args settings=/home/quinten/Examples/Morecambe_settings.cfg image=/home/quinten/Examples/Morecambe_tiles.txt run=1
T30UVE
S2A_MSIL1C_20170525T112121_N0205_R037_T30UVE_20170525T112434_stitch_RGB_RCO_LINEAR_map_small.png
S2A_MSIL1C_20170525T112121_N0205_R037_T30UVE_20170525T112434_stitch_RGB_RCO_LINEAR_map_small.png (82.19 KiB) Viewed 7809 times

T30UVF
S2A_MSIL1C_20170525T112121_N0205_R037_T30UVF_20170525T112434_stitch_RGB_RCO_LINEAR_map_small.png
S2A_MSIL1C_20170525T112121_N0205_R037_T30UVF_20170525T112434_stitch_RGB_RCO_LINEAR_map_small.png (100.14 KiB) Viewed 7809 times

T30UWE
S2A_MSIL1C_20170525T112121_N0205_R037_T30UWE_20170525T112434_stitch_RGB_RCO_LINEAR_map_small.png
S2A_MSIL1C_20170525T112121_N0205_R037_T30UWE_20170525T112434_stitch_RGB_RCO_LINEAR_map_small.png (67.88 KiB) Viewed 7809 times

T30UWF
S2A_MSIL1C_20170525T112121_N0205_R037_T30UWF_20170525T112434_stitch_RGB_RCO_LINEAR_map_small.png
S2A_MSIL1C_20170525T112121_N0205_R037_T30UWF_20170525T112434_stitch_RGB_RCO_LINEAR_map_small.png (66.57 KiB) Viewed 7809 times
Post Reply