User:Ff5722/Using Sentinel-2 imagery
Sentinel-2 satellite data is licenced suitably to be used as background for tracing or any other purpose for OSM (licence). The best resolution available is 10 m, this is enough to trace major roads, rivers, lakes, railways etc. Pretty much the entire world is covered, and imagery is very recent (several captures per month, as recent as last week), however it can be covered in clouds, so in some cases, it is needed to use imagery of a few months old.
To use the imagery in an OSM editor, there are two steps:
- Download the raw data and render into GeoTIFF image files
- Serve imagery as a tileserver to your OSM editor.
The data is not available in a viewable image format for free accounts, therefore you need to process it first. However, Sentinel-hub offers a service to preview the tiles. Note that WMS service is only available for paid accounts, and do not trace directly from their website because their licence is CC 4.0, which is not allowed for OSM use. You can use it as an aid to view which area needs updating, or which date has good cloudless capture. https://apps.sentinel-hub.com/sentinel-playground/
You can either use QGIS or ESA's own software to render the data. I recommend QGIS as it is much more versatile.
- Install QGIS from https://qgis.org/en/site/forusers/download.html
- Download data from scihub.copernicus.eu. You need to register a (free) account to download data. Login with your account, select an area on the map (try to keep the selected area small, it's best to download one tile at once) and search. Filter the results to show only Sentinel-2 captures, set cloud cover limits in the filter 'Cloud Cover % (e.g.[0 TO 9.4])', I recommend cloud cover [0 TO 20]. Download the zip package (usually around 1 GB).
- In QGIS, navigate to your downloaded package and expand the folder
- Add the files with the raster icon and file name ending on B02_10m.jp2, B03_10m.jp2 and B04_10m.jp2 to the QGIS project (see image)
- In the menu bar, go to Raster > Miscellaneous > Build virtual raster
- In the build virtual raster window, click the three dots next to Choose input layers. Select the 3 layers you just added. Select 'Run', it should only take a second to complete.
- Right clicking on the 'Virtual' layer, select properties, and adjust the Min-Max limits under 'Symbology' > 'Band Rendering'. You can adjust each color manually for the best color reproduction. Easier is to expand the 'Min / Max Value Settings', select 'Cumulative count cut' and adjust those values. For a cloudless image without snow, you can set the maximum cutoff pretty high (e.g. 99.7%) to get good detail.
- Save as GeoTIFF or directly render to tiles
Using ESA SNAP software
- Download SNAP and the Sentinel-2 toolbox
- Download data from scihub.copernicus.eu. You need to register a (free) account to download data. Login with your account, select an area on the map (try to keep the selected area small, it's best to download one tile at once) and search. The results with the green tag S2A MSI are the ones you will want. It's recommended to filter the results to show only Sentinel-2 captures, and sort by cloud cover. Download the zip package (usually around 700 MB).
- Process data in SNAP (tutorial). It's recommended to place the downloaded granule on an SSD if available, to speed up the process (lots of R/W operations). Unzip the compressed folder, and open the XML file in the top level (e.g. MTD_MSIL1C.xml). Once it's visible in the left pane, right-click to open RGB view, the three colour bands will be pre-selected. Simply click OK and wait for the RGB image to be generated.Use the colour manipulation tool in the bottom left pane to ensure good contrast of roads etc.
- Export processed image from SNAP. Right-click on the image, click export. Choose 'export full scene' and 'full resolution' and for filetype geoTIFF. It will take several minutes to finish on most computers.