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

Near real time snow cover maps in the Copernicus Browser!

Copernicus provides near real time snow cover maps at 20 m resolution (fractional snow cover, code name: FSC OG). These products have been recently reprocessed and are now available through the Copernicus Data Space Ecosystem (CDSE) API and visualization tool, the Copernicus Browser! The latter is very useful to explore the data, for example if […]

Suivi du manteau neigeux dans les parcs naturels des Alpes franco-italiennes

Dans les Alpes, le manteau neigeux est un stock d’eau saisonnier naturel dont dépendent la faune, la flore et les humains pour de multiples usages (refuges, bétail, etc.). Dans le cadre du projet ACLIMO financé par le programme européen Interreg ALCOTRA, le Cesbio a été sollicité pour mettre en oeuvre un outil d’estimation de l’équivalent […]

The missing link to valorize CESBIO’s applicative research works

=>  My colleagues at CESBIO are extremely creative! Over the past ten years, they have developed a wide range of new products and methods for extracting information from Copernicus data. They don’t just develop and validate the method on a few sites; they continue their work until they have produced data for the whole of […]

Rechercher