EO Training

URBAN MAPPING WITH SENTINEL-1

Categories: Land,

URBAN MAPPING WITH SENTINEL-1

Introduction Print

As the world is facing a large increase in population, reliable information on urban areas is required to assist and help in the decision-making process. Different methods can be used to gather this information, but satellite earth observation offers a suitable approach based on the coverage and type of data that are provided.

A few years ago, the European Union (EU) started an ambitious program, Copernicus, which includes the launch of a new family of earth observation satellites known as the Sentinels. Amongst other applications, this new generation of remote sensing satellites will improve the observation, identification, mapping, assessment, and monitoring of urban areas and their dynamics at a range of spatial and temporal resolutions.In this exercise we will process Sentinel-1 SLC products and derive coherence (in SNAP), which will be used later to map urban areas over a region of interest.

Data used

10 Sentinel-1A SLC products acquired from 12th April to 29 July 2018 [downloadable @ https://scihub.copernicus.eu/]

  • S1A_IW_SLC__1SDV_20180412T171648_20180412T171715_021437_024E95_BDA1
  • S1A_IW_SLC__1SDV_20180424T171648_20180424T171715_021612_02540A_BB21
  • S1A_IW_SLC__1SDV_20180506T171649_20180506T171716_021787_025996_98AB
  • S1A_IW_SLC__1SDV_20180518T171649_20180518T171716_021962_025F27_A15C
  • S1A_IW_SLC__1SDV_20180530T171650_20180530T171717_022137_0264C8_5D94
  • S1A_IW_SLC__1SDV_20180611T171651_20180611T171718_022312_026A3D_BBFC
  • S1A_IW_SLC__1SDV_20180623T171652_20180623T171719_022487_026F7C_450E
  • S1A_IW_SLC__1SDV_20180705T171652_20180705T171719_022662_027499_1B8F
  • S1A_IW_SLC__1SDV_20180717T171653_20180717T171720_022837_0279EC_5E5E
  • S1A_IW_SLC__1SDV_20180729T171654_20180729T171721_023012_027F72_97F6
Software used

Internet browser, SNAP + Sentinel-1 Toolbox, aria2 (download utility)

NOTE: This tutorial was prepared on a Linux Ubuntu 16.04 OS, steps may differ for other OS (Windows version under development)

Reference folder structure

Folder structure referenced in the exercise is as follows:

/LAND06_UrbanClassification_Germany

  • /AuxData – includes auxiliary data needed for the processing – provided upon request or you can re-create them yourself
  • /Original – should contain your downloaded input products
  • /Processing – should contains all intermediate and final results of the processing

Data download – ESA SciHUB

First, we will download the 10 Sentinel-1A products which we will use for the exercise, from the Copernicus Open Access Hub using the online interface. Launch your Internet Browser and go to https://scihub.copernicus.eu

Go to “Open HUB”, if you do not have an account please register by going to “Sign-up” in the LOGIN menu in the upper right corner. (Note that the position of the buttons may change over time since the creation of this tutorial)

If you had to fill-in the registration form, you will receive an activation link by e-mail. Once your account is activated or if you already have an account, “LOGIN”.
Navigate to Osnabrück in north-west Germany (approximate area – blue rectangle).

Switch to drawing mode (marked with green circle below) and draw a search rectangle approximately as indicated above in blue. Open the search menu by clicking to the left part of the search bar and specify the parameters below. Then click on the “Search” icon.
Sensing period: From 2018/04/12 to 2018/07/29
Check Mission: Sentinel-1
Satellite platform: Sentinel-1A
Product type: SLC
Relative Orbit Number: 15

Press “Search” (red arrow below).

Using the icon, import only the following products to Cart (in red you can see the acquisition date):

S1A_IW_SLC__1SDV_20180412T171648_20180412T171715_021437_024E95_BDA1
S1A_IW_SLC__1SDV_20180424T171648_20180424T171715_021612_02540A_BB21
S1A_IW_SLC__1SDV_20180506T171649_20180506T171716_021787_025996_98AB
S1A_IW_SLC__1SDV_20180518T171649_20180518T171716_021962_025F27_A15C
S1A_IW_SLC__1SDV_20180530T171650_20180530T171717_022137_0264C8_5D94
S1A_IW_SLC__1SDV_20180611T171651_20180611T171718_022312_026A3D_BBFC
S1A_IW_SLC__1SDV_20180623T171652_20180623T171719_022487_026F7C_450E
S1A_IW_SLC__1SDV_20180705T171652_20180705T171719_022662_027499_1B8F
S1A_IW_SLC__1SDV_20180717T171653_20180717T171720_022837_0279EC_5E5E
S1A_IW_SLC__1SDV_20180729T171654_20180729T171721_023012_027F72_97F6

Then click on the Profile icon in the upper left corner (marked with blue circle above) and go to Cart. You should now have ten products in your cart. Click on the arrow to Download the Cart.

The grey products are currently placed in an Offline (Long Term) Archive: to learn how to request them please follow the steps outlined here: https://scihub.copernicus.eu/userguide/LongTermArchive

TIP: Alternatively, you can try to retrieve the products from other repositories such as: PEPS (https://peps.cnes.fr/rocket/#/home) or ONDA DIAS Catalogue (https://catalogue.onda-dias.eu/catalogue/) or others. Registering for a free account is usually necessary, but archived data retrieval will be faster than with Open Access Hub.

A products.meta4 file will be downloaded to your Downloads folder. To download our data, we will use aria2 tool. To use the tool, we first need to place the products.meta4 file to the folder where we wish our data to be downloaded to e.g.: …/LAND06_UrbanClassification_Germany/Original

aria2c

The correct response should be as follows (example from Linux):

NOTE 1: If (and only if) the response is “-bash aria2c: command not found” or similar. Then we have to install the tool.
For Linux OS command line type: sudo apt-get install aria2
When requested type: Y
Then you can test your installation again.
For Windows and other OS see: https://aria2.github.io/

If the response is shows an error see NOTE 1. If you have received the correct response (may differ for other OS), then we can run the tool by typing following commands in the command line (replace <username> and <password> with your login credentials for Copernicus Open Access Hub):

cd .../LAND06_UrbanClassification_Germany/Original
aria2c --http-user='<username>' --http-passwd='<password>' --check-certificate=false --max-concurrent-downloads=2 -M products.meta4

The first line changes our directory to the target directory (replace the path with the full path to where you wish to place the downloaded products). The second line runs the download tool. All ten products will be downloaded to the /Original folder automatically, two products in parallel. This might take some time.

TIP: Note that the constraint of maximum 2 parallel downloads at a time is imposed by the Copernicus Access Hub, if you increase the number, your download will fail.

Data exploration

Once the Sentinel-1 images are downloaded, we need to run pre-processing steps before they can be used for the classification. For this purpose, we will use the SNAP software. Launch SNAP (icon on desktop ). When it opens, load the two first S1 images (2018-04-12 and 2018-04-24). For that, click on Open product  and navigate to:  …/LAND06_UrbanClassification_Germany/Original/

The opened product will appear in Product Explorer. Click on the dot to expand the contents of the first image, then expand the Bands folder and click on Intensity_IW2_VH to visualize it (see Note 2).

NOTE 2: The Interferometric Wide (IW) swath mode captures three sub swaths using Terrain Observation with Progressive Scans SAR TOPSAR ). Each sub swath image consists of a series of bursts . The input product contains 3 IW bands, and 8 bursts.

Sentinel-1 SLC pre-processing

In order to process this and the other Sentinel-1 images, we will take advantage of the batch processing option available in SNAP. In this way, we can define a specific processing chain and apply it to several images in an automatic way. This allows reducing processing time and storage requirement since no intermediate steps are created. Only the final product is physically saved.

Before running batch processing, it is necessary to create a graph containing all the processing steps. Go to Tools -> Graph Builder. So far, the graph only has two operators: Read (to read the input) and Write (to write the output). By right-clicking on the white space at the top panel, you can add an operator while a corresponding tab is created and added at the bottom panel. To avoid confusion, delete the Write operator.

Read

In this analysis, we will derive coherence using as input two independent Sentinel-1A products. Due to this, we need to add a second Read operator. For that, right click and go to Add Input-Output Read. ). The corresponding tabs are created and added on the bottom panel. In the first Read tab set the first image ([1] – 2018-04-12) as input. In the second Read(2) tab, set the second image ([2] – 2018-04-24) as input.

TOPSAR-Split

Since the area of interest is included in 2 bursts of the Sentinel-1 image, there is no need to process the whole sub-swath with the 8 bursts (See NOTE 3). The extraction of Sentinel-1 TOPSAR bursts will be made per acquisition and per sub-swath. This process will reduce the processing time in the following processing steps and it is recommended when the analysis is focused only over a specific area. To add the TOPSAR-Split operators, right click and go to Add Radar Sentinel-1 TOPS TOPSAR-Split. Connect the operators as shown below by clicking to the right side of the Read operator and dragging the red arrow towards the TOPSAR-Split operator.

NOTE 3: The extraction of bursts in a sub swath cove ring the area of interest may differ in Sentinel 1 images acquired on different dates.

In the TOPSAR-Split tabs, make sure to select the following parameters:

  • Subswath: IW2
  • Bursts: 1 to 2 (To do so, click on and drag it to the left until you reach Burst 2)
    Do not click on any polarization. By default both are selected.

Apply Orbit File

Next, we will update the orbit metadata (See NOTE 4) of the product to provide accurate satellite position and velocity information. To add the operators to our graph, right click and go to Add Radar Apply-Orbit-File. Connect the Apply-Orbit-File operators as shown below.

NOTE 4: The orbit state vectors provided in the metadata of a SAR product are generally not accurate and can be refined with the precise orbit files, which are available days-to-weeks after the generation of the product. The orbit file provides accurate satellite position and velocity information. Based on this information, the orbit state vectors in the abstract metadata of the product are updated.

Back Geocoding

Now we will co-registers the two S-1 SLC split products (master and slave) of the same sub-swath using the orbits of the two products and a Digital Elevation Model (DEM). To add the operator, go to Add Radar Corregistration S1 TOPS Corregistration Back-Geocoding. Set the two Apply Orbit File operators as input. In the corresponding parameters tab, leave the default values.

Enhanced Spectral Diversity

This operator first estimates a constant range offset for the whole sub-swath of the split S-1 SLC image using incoherent cross-correlation. Then, estimates a constant azimuth offset for the whole sub-swath using an Enhanced Spectral Diversity (ESD) method. Finally, it performs range and azimuth corrections for every burst using the range and azimuth offsets previously estimated. Right click and go to Add Radar Coregistration S-1 TOPS coregistration Enhanced-Spectral-Diversity. Connect the Back-Geocoding operator as shown below and leave all the parameters as default in the Enhanced-Spectral-Diversity tab.

Coherence

Next, we will add the operator to derive the coherence image (See NOTE 5). Right click and go to Add Radar Interferometric Products Coherence. Connect the Coherence operator as shown below, select the option Subtract flat-earth phase and change the Square pixel parameter to 20.

NOTE 5: Coherence is the fixed relationship between waves in a beam of electromagnetic (EM) radiation. Two wave trains of EM radiation are coherent when they are in phase. That is, they vibrate in unison. In terms of the application to things like RADAR, the term coherence is also used to describe systems that preserve the phase of the received signal.

TOPSAR Deburst

We continue the processing steps with Sentinel-1 TOPSAR Deburst. We have seen that each sub-swath image consists of a series of bursts, where each burst has been processed as a separate SLC image. The individually focused complex burst images are included, in azimuth-time order, into a single sub-swath image with black-fill demarcation in between. There is sufficient overlap between adjacent bursts and between sub-swaths to ensure the continuous coverage of the ground. The images for all bursts in all sub-swaths are resampled to a common pixel spacing grid in range and azimuth while preserving the phase information.


To add the TOPSAR-Deburst operator, go to Add Radar Sentinel-1 TOPS TOPSAR-Deburst. In the TOPSAR-Deburst tab, select Polarizations: VV. Connect the Coherence operator as shown below and keep all the parameters as default.

Multi-look

As the original SAR image contains inherent speckle noise, multilook processing is applied at this moment to reduce the speckle appearance and to improve the image interpretability. To add the Multilook operator go to Add Radar SAR Utilities Multilook. Connect it to the TOPSAR-Deburst operator and keep the default parameters.

Terrain correction

Our data are still in radar geometry, moreover due to topographical variations of a scene and the tilt of the satellite sensor, the distances can be distorted in the SAR images. Therefore, we will apply terrain correction to compensate for the distortions and reproject the scene to geographic projection (see Note 6). To add the operator to our graph, right click and go to Add Radar Geometric Terrain Correction Terrain-Correction. Connect it to the Multilook operator, change the pixel spacing to 15 at the corresponding tab and make sure you select UTM / WGS 84 (Automatic) as Map Projection.

NOTE 6: The geometry of topographical distortions in SAR imagery is shown below. Here we can see that point B with elevation h above the ellipsoid is imaged at position B’ in SAR image, though its real position is B”. The offset Δr between B’ and B” exhibits the effect of topographic distortions.

Subset

Next, we need to reduce the spatial extent to focus on our study area. For that, add the Subset operator. Right-click and go to Add Raster Geometric Subset. Connect it to the Terrain-Correction operator. Select the option Geographic Coordinates and copy/paste the following coordinates in Well-Known-Text format. Click Update to load them and Zoom in to the area.

POLYGON ((7.883054797352848 52.37328212685329, 8.210910785692109 52.37592581845208, 8.214610329430705 52.1670955892227, 7.888290792013983 52.16447160649477, 7.883054797352848 52.37328212685329))

Write

Finally, we need to properly save the output. For that, we first need to add the Write operator to our graph. Right click and go to Add Input-Output Write. Connect the Write operator to the Subset operator. In the Write tab, make sure you set the following name and directory.

Name: Coherence_20180412_20180424
Path: …/LAND06_UrbanClassification_Germany/Processing/


Once finished, click on the Save icon. Navigate to the following path and save the graph as 1_S1_Splt_Orb_Cor_Coh_Deb_ML_TC.xml. Then, click Run to start the processing. It can take some time depending on your VM specifications (3 hours approx. in a 16GB RAM and 4 cores VM).

Path: …/LAND06_UrbanClassification_Germany/AuxData/

Sentinel-1 Coherence classification

Import vector data

To prepare the data for the classification, the shapefile of the training areas has to be imported. Select the Coherence_20180412_20180424 product in the product explorer and go to Vector Import ESRI Shapefile. Navigate to the following path and click Open after selecting all the files. Click No in the import geometry dialog.

Path: …/LAND06_UrbanClassification_Germany/AuxData/

Once the vector data have been imported, do not forget to save the changes. Right click on the subset product (index [3]) and click on Save Product. The vector data folder of the subset product should look like the following image. Expand the product and open the Vector Data folder to check it.

Random Forest classification

For this exercise, the Random Forest classification algorithm will be used (See NOTE 7). Click on Raster Classification Supervised Classification Random Forest Classifier

NOTE 7: The Random Forest algorithm is a machine learning technique that can be used for classification or regression. In opposition to parametric classifiers (e.g. Maximum Likelihood), a machine learning approach does not start with a data model but instead learns the relationship between the training and the response dataset. The Random Forest classifier is an aggregated model, which means it uses the output from different models (trees) to calculate the response variable.

Decision trees are predictive models that recursively split a dataset into regions by using a set of binary rules to calculate a target value for classification or regression purposes. Given a training set with n number of samples and m number of variables, a random subset of samples n is selected with replacement (bagging approach) and used to construct a tree. At each node of the tree, a random selection of variables m is used and, out of these variables, only the one providing the best split is used to create two sub-nodes.

By combining trees, the forest is created. Each pixel of a satellite image is classified by all the trees of the forest, producing as many classifications as number of trees. Each tree votes for a class membership and then, the class with the maximum number of votes is selected as the final class. More information about Random Forest can be found in Breiman, 2001.

In the ProductSet-Reader tab, click on the symbol. Navigate to the following path and select the coherence image as input (Coherence_20180412_20180424).

Path: …/LAND06_UrbanClassification_Germany/Processing/

Move to the Random-Forest-Classifier tab and set the following parameters:

  • Uncheck the Evaluate classifier option
  • Set the number of trees to 500
  • Select all the shapefiles as training vectors
  • Select all the bands as feature bands

Click now on the Write tab, set the Output folder to the following path, and specify the output name according to the number of coherence images used: Classification_1_Coherence. Finally, click Run.

Path: /shared/Training/LAND06_UrbanClassification_Germany/Processing/

To visualize the result, expand the Bands folder in the Classification_1_Coherence product and double click on LabelledClasses. You can change the colours by clicking on the Colour Manipulation tab located in the lower left corner or by clicking on View Tool Windows Colour manipulation. Select your own colours or click on the ‘Import colour palette’ icon (). Navigate to the following path and select the RF_Colour.cpd file.

Path: …/LAND06_UrbanClassification_Germany/AuxData/

Extra steps

Coherence images

The result produced by using a single coherence image can be improved if more coherence products are used for the classification. For this, we first have to produce them by following the same approach as before. In SNAP, close all previous products, go to File Open product, navigate to the following path and open the remaining 8 Sentinel-1 images that have not been used before. (2018-05-06 | 2018-05-18 | 2018-05-30 | 2018-06-11 | 2018-06-23 | 20180705 | 20180717 | 20180729)

Path: …/LAND06_UrbanClassification_Germany/Original/

Next, go to Tools GraphBuilder click on Load, navigate to the following path and open the 1_S1_Splt_Orb_Cor_Coh_Deb_ML_TC.xml graph file. Change the following parameters and click Run. Remember that processing this graph may take some time depending on your VM specifications.

  • Read tab → Make sure to select the Sentinel-1 product from 2018-05-06 (index [1]).
  • Read(2) tab → Select the Sentinel-1 product from 2018-05-18 (index [2]).
  • Write tab → Change the output name to Coherence_20180506_20180518

Once finished, repeat the same procedure for the remaining pair of images. Please note that since this graph is computationally demanding, you may need to close and open SNAP in order to release memory before processing a new pair of Sentinel-1 SLC products.

Read → 2018-05-30 [3] | Read(2) → 2018-06-11 [4] | Write → Coherence_20180530_20180611
Read → 2018-06-23 [5] | Read(2) → 2018-07-05 [6] | Write → Coherence_20180623_20180705
Read → 2018-07-17 [7] | Read(2) → 2018-07-29 [48] | Write → Coherence_20180717_20180729

After all the coherence images have been produced, close all the products in SNAP except for the 5 coherence images.

Create raster stack

To use all the images as input for the Random Forest classification, we first need to stack all the products together. For that, go to Radar → Corresgistration → Stack Tools → Create Stack. In the ProductSet-Reader tab, click at the icon to add the opened products. Click also at the icon to update the metadata information.

Move now to the CreateStack tab and set the following parameters and click on the Find Optimal Master button.

  • Resampling type: NEAREST_NEIGHBOR
  • Initial offset method: Product Geolocation

In the Write tab, change the output name to Coherence_Stack and make sure the output directory is set to the following path and then click Run.

Path: …/LAND06_UrbanClassification_Germany/Processing/

Multi-temporal Random Forest classification

Once the images are stacked, we can use them as input for the classification. Click on Raster → Classification → Supervised Classification → Random Forest Classifier
In the ProductSet-Reader tab, click on the symbol. Navigate to the following path and select the stacked product as input (Coherence_Stack).

Path: …/LAND06_UrbanClassification_Germany/Processing/

Move to the Random-Forest-Classifier tab and set the following parameters:

  • Uncheck the Evaluate classifier option
  • Set the number of trees to 500
  • Select all the shapefiles as training vectors
  • Select all the bands as feature bands

    Click now on the Write tab, set the Output folder to the following path, and specify the output name according to the number of coherence images used: Classification_5_Coherence. Finally, click Run.

    Path: …/LAND06_UrbanClassification_Germany/Processing/

To visualize the result, expand the Bands folder in the Classification_5_Coherence product and double click on LabelledClasses. You can change the colours by clicking on the Colour Manipulation tab located in the lower left corner or by clicking on View → Tool Windows → Colour manipulation. Select your own colours or click on the ‘Import colour palette’ icon (). Navigate to the following path and select the file RF_Colour.cpd.

Path: …/LAND06_UrbanClassification_Germany/AuxData/

Further reading and resources

Sentinel-1 User Guide

Sentinel-1 Technical Guide

InSAR Principles – ESA

Breiman, L. (2001). Random Forests. Machine Learning, 45, 5–32, 45(1), 5–32.

Search
Browse by topic
Related Tutorials

CROP MAPPING WITH SENTINEL-2

Reference folder structure Folder structure referenced in the exercise is as follows: /LAND01_CropMapping_Seville /AuxData – includes auxil…

Doing business with us

EO expertise at your service

We are used to prepare and release training materials, but also to work in partnership with the Earth Observation industry and we may complement your business case with training or consultancy services. Do not hesitate to get in touch with us to get an offer for a customized training event or EO consultancy services…