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 and pan in full screen.

 

# download L3A images over Belgium

python theia_download.py -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

gdal2tiles.py -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

3 thoughts on “Belgium at 10 m resolution in July 2018

  1. 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 : http://www.esa-sen2agri.org/

  2. 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.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.