Belgium at 10 m resolution in July 2018

Using the new L3A product in Theia it is possible to make nice cloud-free mosaics from Sentinel-2 imagery. Here is an example for Belgium and the script to do it in your terminal.


Click here to view in full screen.

# download L3A images over Belgium
python -l 'Belgium' -d 2018-07-01 -f 2018-07-31 --level LEVEL3A -a config_theia.cfg
# unzip using GNU parallel
parallel unzip ::: SENTINEL2X_201807*zip
# make a mosaic of each band
# WARNING only works if all images have the same projection otherwise an extra step is required with gdalwarp
parallel gdalbuildvrt {}.vrt SENTINEL2X_201807*/*{}*.tif ::: B2 B3 B4
# stack the band mosaics
gdalbuildvrt -separate B432.vrt B4.vrt B3.vrt B2.vrt
# export as a RGB image at full resolution
gdal_translate -ot Byte -scale 0 2000 B432.vrt B432.tif
# Optionally clip the image using the polygon of the Belgium borders

gdalwarp -dstnodata 0 -q -cutline Belgium.kml -crop_to_cutline B432.tif B432_Belgium.tif
# make a tiled map to display in a browser -z 6-12 B432_Belgium.tif


NB) I used this command to generate the file Belgium.kml from the Eurostat Countries datasets:

ogr2ogr -f KML Belgium.kml -where "NAME_ENGL='Belgium'" CNTR_RG_01M_2016_4326.shp

Posted under: Composite (3A), In English, Sentinel-2


  • Olivier Hagolle on 30/08/2018 at 12:51 said:

    Thanks Simon, that's a fair feedback to produce Belgium, as the processor was developped in the framework of Sen2Agri project, lead by the Université Catholique de Louvain, in Belgium/

    Sen2Agri :

  • Olivier Hagolle on 30/08/2018 at 12:52 said:

    We should also do Romania, as the processor was developped at CS-Romania.

  • Radu Oleniuc on 30/08/2018 at 21:43 said:

    Really cool. So much sharpness. I hope you could you could do for Romania as well, just to prove the concept, because here there are very few people interested in this, and the satellite data is still kept in secrecy by the state agencies (to hide their incompetence, I guess).

    A mosaic with different bands (smoke, aerosol pollution for example) will be very interesting, maybe I'll have some time to install all the forks required and try.

    Thanks again.

Leave a Reply to Olivier Hagolle Cancel reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>