Optical mosaic#

Overview#

A mosaic is a combination or fusion of two or more images. In SEPAL, you can create a single raster dataset from several raster datasets by mosaicing them together. This can be achieved on both contiguous rasters (left) and overlapping images (right).

These overlay areas can be managed in various ways. For example, you can choose to keep only the raster data from the first or last dataset, combine the values of the overlay cells using a weighting algorithm, average the values of the overlay cells, or take the maximum or minimum value. In addition, certain corrections can be made to the image to account for clouds, snow, and other factors. These operations are complex and repetitive. SEPAL offers you an interactive and intuitive way to create mosaics in any area of interest (AOI).

Note

You won’t be able to retrieve the images if your SEPAL and Google Earth Engine (GEE) accounts are not connected. Navigate to Use Google Earth Engine (GEE) with SEPAL to learn more.

Start#

Once the mosaic recipe is selected, SEPAL will display the recipe process in a new tab (1) and the AOI selection window will appear on the lower-right side (2).

The first step is to change the name of the recipe. This name will be used to identify your files and recipes in SEPAL folders. Use the best-suited convention for your needs. Simply double-click the tab and write a new name. It will default to Optical_mosaic_<start_date>_<end_date>_<band name>.

Note

The SEPAL team recommends using the following naming convention: <aoi name>_<dates>_<measure>.

Parameters#

In the lower-right corner, 5 tabs are available. They will allow you to customize the mosaic creation to your needs.

  • AOI: area of interest

  • DAT: target date of interest for the mosaic/composite

  • SRC: source datasets of the mosaic/composite

  • SCN: scene selection parameters

  • CMP: composition parameters

AOI Selection#

The data exported by the recipe will be generated from within the bounds of the AOI. There are multiple ways to select the AOI in SEPAL:

  • Administrative boundaries

  • EE Tables

  • Drawn polygons

they are extensively described in our documentation. Please read feature/aoi_selector to know more.

Date#

Yearly mosaic#

In the DAT tab, you will be asked to select a year. It will define the year which pixels in the mosaic should come from. When the selection is done, click on the Apply button.

Seasonal mosaic#

Click on More in the DAT panel to expand the date selection tool. Rather than selecting a year, you can select a season of interest.

Click on the (1) to open the date selection pop-up. The selected date will be the target of the mosaic (the date from which pixels in the mosaic should ideally come).

Using the main slider (2) define a season around the target date. This season defines two dates: a starting date and an ending date. SEPAL will then retrieve the mosaic images between those dates.

The number of images in one single season of one year may not be enough to produce a correct mosaic. SEPAL provides two secondary sliders to increase the pool of images to create the mosaic. Both count the number of seasons SEPAL can retrieve in the past (Past season - (3)) and in the future (Future season - (4)).

When the selection is done click on the Apply button.

Sources#

As mentioned in the introduction, a mosaic uses different raster datasets that can be obtained from multiple sources. SEPAL allows you to select data from multiple entry points. Below, you can find a description of these sources (click on the link to see the corresponding dataset information):

  • L8: Landsat 8 Tier 1. Landsat scenes with the highest available data quality are placed into Tier 1 and considered suitable for time-series processing analysis. Tier 1 includes Level-1 Precision Terrain (L1TP) processed data that have well-characterized radiometry and are inter-calibrated across the different Landsat sensors. The geo-registration of Tier 1 scenes will be consistent and within prescribed tolerances (<=12 m root mean square error [RMSE]). All Tier 1 Landsat data can be considered consistent and inter-calibrated (regardless of the sensor used) across the full collection.


  • L8 T2: Landsat 8 Tier 2. Scenes not meeting Tier 1 criteria during processing are assigned to Tier 2. This includes Systematic terrain (L1GT) and Systematic (L1GS) processed scenes, as well as any L1TP scenes that do not meet the Tier 1 specifications due to significant cloud cover, insufficient ground control, and other factors. Users interested in Tier 2 scenes can analyze the RMSE and other properties to determine the suitability for use in individual applications and studies.


  • L7: Landsat 7 Tier 1. Landsat scenes with the highest available data quality are placed into Tier 1 and are considered suitable for time-series processing analysis. Tier 1 includes Level-1 Precision Terrain (L1TP) processed data that have well-characterized radiometry and are inter-calibrated across the different Landsat sensors. The geo-registration of Tier 1 scenes will be consistent and within prescribed tolerances (<=12 m RMSE). All Tier 1 Landsat data can be considered consistent and inter-calibrated across the full collection (regardless of the sensor used).


  • L7 T2: Landsat 7 Tier 2. Scenes not meeting Tier 1 criteria during processing are assigned to Tier 2. This includes Systematic terrain (L1GT) and Systematic (L1GS) processed scenes, as well as any L1TP scenes that do not meet the Tier 1 specifications due to significant cloud cover, insufficient ground control, and other factors. Users interested in Tier 2 scenes can analyze the RMSE and other properties to determine the suitability for use in individual applications and studies.


  • L4-5: Landsat 4 Tier 1 combined with Landsat 5 Tier 1. Landsat scenes with the highest available data quality are placed into Tier 1 and are considered suitable for time-series processing analysis. Tier 1 includes Level-1 Precision Terrain (L1TP) processed data that have well-characterized radiometry and are inter-calibrated across the different Landsat sensors. The geo-registration of Tier 1 scenes will be consistent and within prescribed tolerances (<=12m RMSE). All Tier 1 Landsat data can be considered consistent and inter-calibrated across the full collection (regardless of the sensor used).


  • L4-5 T2: Landsat 4 TM Tier 2 combined with Landsat 5 TM Tier 2. Scenes not meeting Tier 1 criteria during processing are assigned to Tier 2. This includes Systematic terrain (L1GT) and Systematic (L1GS) processed scenes, as well as any L1TP scenes that do not meet the Tier 1 specifications due to significant cloud cover, insufficient ground control, and other factors. Users interested in Tier 2 scenes can analyze the RMSE and other properties to determine the suitability for use in individual applications and studies.


  • A+B: Sentinel-2 Multispectral instrument is a wide-swath, high-resolution, multi-spectral imaging mission supporting Copernicus Land Monitoring studies, including the monitoring of vegetation, soil and water cover, as well as the observation of inland waterways and coastal areas.

To validate your selection, click on the Apply button.

Scenes#

Note

If Sentinel and Landsat data have been selected, you will be forced to use all scenes. As the tilling system from Sentinel and Landsat data are different, it’s impossible to select scenes using the tool presented in the following sections.

You can use multiple options to select the best scenes for your mosaic. The most simple is to use every image available based on the date parameters. Click Use all scenes and all of the images will be integrated into the mosaic.

Choose Select scenes and 3 new selection options will become available. SEPAL sorts the images available for each tile. Three Priority options are available; choose the one that suits your analysis:

  • Cloud free: Prioritizes images with zero or few clouds.

  • Target date: Prioritizes images that match with the target date

  • Balanced: Prioritizes images that maximize both cloud and target date.

To validate your selection, click on the Apply button.

Composite#

Note

This step is optional. SEPAL provides the folowing options by default:

  • Correction: SR, BRDF

  • Pixel filters: No filters

  • Cloud detection: QA bands, Cloud score

  • Cloud masking: Moderate

  • Cloud buffering: None

  • Snow masking: On

  • Composing method: Medoid

To create a mosaic, you will need to provide SEPAL with the compositing method to create the final image. Here is a description of all of the possible compositing options available.

Corrections#

This will apply corrections on the stacked pixels to improve the quality of the mosaic.

  • SR: Surface reflectance improves comparison between multiple images over the same region by accounting for atmospheric effects such as aerosol scattering and thin clouds, which can help in the detection and characterization of Earth surface change. Top of atmosphere images are used if not selected.

  • BRDF: Uses a bidirectional reflectance distribution function model to characterize surface reflectance anisotropy. For a given land area, the BRDF is established based on selected multiangular observations of surface reflectance.

  • Calibrate: Calibrates Sentinel and Landsat data to make them compatible.

    Note

    This option is only available if Landsat and Sentinel data are mixed, as well as BRDF and SR corrections are disabled.

Pixel filters#

Activating any of the filters will remove some pixels from the stack. Removing pixels improves the quality of the mosaic, as they are not taken into account in the median value computation.

Note

Each filter is applied iteratively. For example, if the Normalized difference vegetation index (NDVI) is already filtering all pixels but one, there will be nothing left in the stack to be filtered by day of the year. Note as well that adding filters significantly increases the creation time of the mosaic.

  • Shadow: Filters the xx% darkest pixels of the stack.

  • Haze: Computes a haze index and filter the xx% highest values.

  • NDVI: Computes the NDVI and only keeps the xx% highest values.

  • Day of the year: Computes the distance from target day in days and filters out the xx% farthest.

Cloud detection#

It refers to the algorithm used to detect clouds.

  • QA bands: Uses QA bands to identify clouds in Sentinel data.

  • Cloud score: Uses the computed cloud score to identify clouds in Landsat data.

  • Pino 26: Uses the Pino_26 algorithm to identify clouds (D. Simonetti, 2021).

    Note

    This filter is only available for Sentinel exclusive source and when both BRDF and SR correction are disabled.

Cloud masking#

Controls how clouds will be masked based on the cloud detection algorithm selected.

  • off: Uses cloud-free pixels if possible, but doesn’t mask areas without cloud-free pixels.

  • moderate: Relies only on image source QA bands for cloud masking. Moderate threshold is used.

  • aggressive: Relies on image source QA bands and a cloud scoring algorithm for cloud masking with an aggressive threshold. This will probably mask out some built-up areas and other bright features.

Cloud buffering#

When pixels are identified as clouds, SEPAL can remove pixels in a small buffer around it to prevent hazy pixels at the borders of clouds to be included in the mosaic.

Note

Buffering is done on the pixel level, so using this option will significantly increase the creation time of the mosaic.

  • none: Doesn’t use cloud buffering

  • moderate: Masks an additional 120 m around each larger cloud.

  • aggressive: Masks an additional 600 m around each larger cloud.

Snow masking#

Define how snowy pixels will be masked.

  • on: Masks snow. This tends to leave some pixels with shadowy snow.

  • off: Doesn’t mask snow. Note that some clouds might get misclassified as snow, and because of this, disabling snow masking might lead to cloud artifacts.

Composing method#

After filtering the stack of pixels, SEPAL will compute the median value on the different bands of the image. The composing method will define how the final pixel value is extracted.

  • Medoid: Uses the closest pixel from the median value. As a real pixel from the stack, the final value will embed metadata (e.g. the date of observation).

  • Median: Uses the computed value of the median. If no pixel is matching this value, the pixel will not embed any metadata. It tends to produce smoother mosaics.

Analysis#

After selecting the parameters, you can start interacting with the scenes and begin the analysis. In the upper-right corner, three tabs are available. They will allow you to customize the mosaic scene selection and export the final result.

  • : auto-select scenes

  • : clear selected scenes

  • : retrieve mosaic

Note

If you have not selected the option Select scenes in the SCN tab, the button will be disabled and the scene areas will be hidden as no scene selection needs to be performed (see those with a number in a circle on the previous screenshot). If you can’t see the image scene area, you probably have selected a small area of interest. Zoom out on the map and you will see the number of available images in the circles.

Select Scenes#

To create a mosaic, you need to select the scenes that will be used to compute each pixel value of the mosaic. To do so, SEPAL provides a user-friendly interface that will guide you through the selection process. You don’t have to select the stack for every pixel; instead, SEPAL will clip the AOI in smaller pieces called Tiles. These tiles correspond to the native tiling system of your dataset and are displayed on the map with circled numbers in their centroid. Each number corresponds to the number of scenes available to build the mosaic tile; hover over these circles to see the tile boundaries appear.

Note

Landsat and Sentinel datasets have a different grid system, which is why the selection process cannot be used if you have selected both of these datasets. If you have an idea related to the user interface (UI) that could make them work together, please let us know in our issue tracker. We would be happy to implement it.

Auto-select scene#

Clicking on the tab will open the auto-selection panel. Move the sliders to select the minimum and the maximum number of scenes SEPAL should select in a tile. Then, click on the Validate button to apply the auto-select method. SEPAL will use the priority defined in the SCN tab to order the scene and collect the optimal number for your request.

Note

The result is never perfect but can be used as a starting point for the manual selection of scenes.

Clear all scene#

If at least one scene is selected, the tab will be available. Click on it to open the clear panel. Click on Clear scenes and all the scenes selected, either manually or automatically, will be removed.

Manual selection#

To open the scene selection menu, hover over a tile circled-number and click on it (1). The window will be divided into two sections:

  • Available scene (2): All the available scenes according to the parameters you selected. These scenes are ordered using the priority parameter you set in SCN tab.

  • Selected scenes (3): The scenes that are currently selected.

Each thumbnail represents a scene of the tile stack. You have the option to include them in the mosaic. The scenes located on the left side are the available scenes; the available scene is on the right side. In both cases, the following information can be found on the thumbnail:

  • A small preview of the scene in the red, blue, green band combination.

  • The exact date in yyyy-mm-dd of the scene.

  • The satellite name .

  • The cloud coverage of the scene in % and its position in the stack values .

  • The distance from target day in days within the season and its position in the stack values .

You can decide to move the scene to the Selected area by clicking Add or moving it back to Available by clicking Remove.

Tip

Scenes are moved from one side to the other so they are not duplicated and cannot be selected twice. Be careful if your connection is slow; wait for the thumbnail to move before clicking again (if you click too fast, you could select 2 different images instead of one).

Once you are happy with your selection, click the Apply button to close the window and use the selected scenes to compute the mosaic on this tile. When the window is closed, SEPAL resets the rendering of all the tiles.

Retrieve#

Clicking on the tab will open the retrieve panel where the you can select the exportation parameters.

Bands#

You need to select the band(s) to export with the mosaic. There is no maximum number of bands, but exporting useless bands will only increase the size and time of the output. See the Available bands to discover the full list of the SEPAL available bands.

Tip

There is no fixed rule to the band selection. Each index is more adapted to a set of analyses in a defined biome. The knowledge of the study area, the evolution expected and the careful selection of an adapted band combination will improve the quality of downstream analysis.

Dates#
  • dayofyear: The Julian calendar date (day of the year)

  • dayfromtarget: The distance to the target date within the season in days.

Scale#

You can set a custom scale for exportation by changing the value of the slider in meters (m). (Note: Requesting a smaller resolution than images’ native resolution will not improve the quality of the output, just its size, so keep in mind that Sentinel data native resolution is 10 m and Landsat is 30 m.)

Destination#

You can export the image to the SEPAL workspace or to the ;guilabel:Google Earth Engine Asset folder. The same image will be exported to both; however, for the former, you will find it in .tif format in the Downloads folder; for the latter, the image will be exported to your GEE account asset list.

Note

If Google Earth Engine Asset is not displayed, it means that your GEE account is not connected to SEPAL. Please refer to Connect SEPAL to GEE.

Click on Apply to start the download process.

Exportation status#

Going to the task tab (lower-left corner using the or buttons, depending on the loading status), you will see the list of the different loading tasks. The interface will provide you with information about the task progress and it will display an error if the exportation has failed. If you are unsatisfied with the way we present information, the task can also be monitored using the GEE task manager.

Tip

This operation is running between GEE and SEPAL servers in the background. You can close the SEPAL page without stopping the process.

When the task is finished, the frame will be displayed in green, as shown on the second image.

Access#

Once the download process is complete, you can access the data in your SEPAL folders. The data will be stored in the Downloads folder using the following format:

.
└── downloads/
    └── <MO name>/
        ├── <MO name>_<gee tile id>.tif
        ├── <MO name>_<gee tile id>.tif
        ├── ...
        ├── <MO name>_<gee tile id>.tif
        └── <MO name>_<gee tile id>.vrt

Note

Understanding how images are stored in an optical mosaic is only required if you want to manually use them. The SEPAL applications are bound to this tiling system and can digest this information for you.

The data are stored in a folder using the name of the optical mosaic as it was set in the first section of this documentation. As the number of data is spatially too big to be exported at once, the data are cut into small pieces and brought back together in a <MO name>_<gee tile id>.vrt file.

Tip

The full folder with a consistent tree folder is required to read the .vrt

Important

Now that you have downloaded the MO to your SEPAL and/or GEE account, it can be downloaded to your computer using FileZilla or used in other SEPAL workflows.