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

Rapid analysis of the GLOF in Gupis, Gilgit-Baltistan

Pakistan news media reported that a glacier lake outburst flood (the failure of a dam containing a glacial lake) occurred near Gupis, Gilgit-Baltistan, a highly mountainous region administered by Pakistan. Satellite images show that the flood triggered a debris flow, which reached the Gupis valley where it hit the Roshan (Rashon) village and blocked the […]

Évolution du jour de déneigement dans les Alpes françaises et les Pyrénées

Les socio-écosystèmes des Alpes et des Pyrénées dépendent étroitement des fluctuations annuelles du manteau neigeux. En particulier, le moment de l’année où la neige disparait détermine le début de la saison de croissance de la végétation de montagne et donc la période des estives. Le changement climatique est en train de bouleverser ce rythme saisonnier. […]

BIOMASS, the third launched satellite mission designed at CESBIO !

After SMOS in 2009, and VENµS in 2017, the CESBIO laboratory is very proud to see its third proposed mission, Biomass, reach orbit. As always, it has been a long journey from the idea, at the beginning of the century, to the selection in 2013 as the seventh Earth Explorer Mission by ESA, to the […]

Rechercher