How to make a mosaic of Theia snow products in three command lines

Assuming that you have downloaded from Theia and unzipped several products in the same directory. Assuming that you have a Linux OS with GNU Parallel, GDAL and OTB command line utilities installed..

 

  

Then, in your terminal, type:

# Get the color table
wget https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow/-/raw/75-lis-color-table-for-otb-not-updated-after-changed-nodata/hpc/LIS_SEB_style_OTB.txt
# reproject all SNW raster products to a common system (here Web Mercator) and assign 255 to nodata
parallel gdalwarp -srcnodata 255 -overwrite -r near -t_srs "EPSG:3857" {} {/} ::: $(ls SEN*/*SNW*.tif)
# Apply color table
parallel otbcli_ColorMapping -in {} -out c{} uint8 -method.custom.lut LIS_SEB_style_OTB.txt ::: $(ls S*SNW*.tif)
# Merge colored images and set 0 to nodata
gdal_merge.py -n 0 c*tif -o mosaic.tif -co COMPRESS=DEFLATE

This is yesterday’s snow cover map of the entire French Alps (10 December 2020). Snow is cyan, clouds are white.

Plus d'actualités

Sentinel-2 overtakes Landsat in scientific litterature

The OpenAlex is a new but already very convenient open database to survey scientific litterature. For a coming blog post on CNES Datacampus site, I studied the proportion of papers using only one of the Sentinel-2 or Landsat missions, and papers using both of them, in 2025. And what stroke me is that Sentinel-2 just […]

Three Sentinel-2 satellites instead of two: impact on the retrieval of the snow disappearance date

Due to the success of Olivier’s petition, ESA kept Sentinel-2A operational after the launch of Sentinel-2C. Having three operational satellites instead of two increases the revisit, which should improve the quality of the derived products, and therefore the reliability of operational services based on Sentinel-2 data. One of this service is the Copernicus’ High Resolution […]

Autumn snow drought on Mount Damavand

« We are currently experiencing the driest autumn the country has experienced in 50 years » said Iran’s meteorological organisation. Near Tehran, Mount Damavand, the highest peak in Iran (5609 m) was reported to be « unusually bare of snow ». I checked this statement using my MODIS snow cover data processing algorithm implemented in Google Earth Engine (Gascoin […]

Rechercher