Skip to main content

Background

Sentinel-1 Ground-Range Detected (GRD) products are available for download from ASF’s Vertex data portal. These Level-1 GRD products are georeferenced to geographic coordinates using the Earth ellipsoid WGS84, but are still in SAR geometry.

By following this data recipe, users will learn how to geocode Sentinel-1 GRD products in QGIS 2.18 using the Warp (Reproject) tool. QGIS version 2.18 is the current long term release, and while the basic approach is still the same in QGIS 3.X, the interface is slightly different. For instructions specific to QGIS 3.X, refer to ASF’s Geocoding Sentinel-1 GRD Products using QGIS 3.X Data Recipe.

Why Geocode?

Once extracted from their zip file, GRD products downloaded from Vertex can be viewed directly in QGIS without any additional steps. The georeferenced TIFF files include the information necessary to allow most GIS software platforms to project the data layers on the fly to match the other layers in your GIS, so you can easily visualize the data without additional effort. If you are visualizing the images outside of a GIS platform, however, the images may appear reversed or rotated. To display the images as you would expect to see them, the image must be transformed from its SAR geometry into a map projection. When working with SAR data, this process is called “Geocoding”.

Geocoding the imagery will ensure not only that the image displays at the correct location on the Earth’s surface in any given application, but that the image will also display as expected when it is viewed outside of a spatially-enabled framework (i.e. north is up, features are not stretched or reversed in unexpected ways).

Even when working within a GIS, if you want to go beyond simply visualizing the data and perform analysis or geoprocessing functions using the GRD granule, it should be geocoded to a map projection first. In QGIS, this can be accomplished by using the Warp (Reproject) tool. If you would prefer to use GDAL or ArcGIS to geocode, refer to ASF’s Data Recipes for geocoding products within each of these platforms.

Note that using different geocoding techniques/options may result in slight differences in the output products. While one output is not necessarily “better” than another, it is a good idea to be consistent when generating geocoded products for use in the same project, especially if you are looking at imagery from one location through time. The best approach to use will vary depending on the goals and preferences of the user.

Geocoding is NOT Terrain Correction

It is important to understand that this geocoding process does not involve terrain correction. To match the imagery to actual features on the earth and correct for distortions caused by the side-looking geometry of SAR data, you must perform Radiometric Terrain Correction (RTC) instead. This will be particularly important in areas of high topographic variation. Refer to ASF’s Data Recipes on Radiometric Terrain Correction, or contact ASF to learn about other resources for RTC processing.

Prerequisites

Materials List

Note to Mac users: Take care with your QGIS installation. Consult the README file in the installation folder to ensure that you install the required software packages in the correct order and add any additional paths required to access GDAL-based tools.

  • The GdalTools Plugin MUST be installed and selected in QGIS 2.18
     
  1. Under the Plugins menu, select Manage and Install Plugins
  2. Click the Installed tab and check to see if GdalTools is listed
    • If so, make sure the box next to it has an X and click Close
  3. If GdalTools is not listed, select the All tab and enter GdalTools in the Search field
    • Highlight the GdalTools plugin in the list and click the Install plugin button
    • Once installed, make sure the box next to it has an X, then click the Close button
  4. If the GdalTools plugin is not properly installed and activated, the required Raster menu items will not be available for use.
  • Earthdata login credentials
    • If you do not already have an Earthdata account, visit the Earthdata website to register for this free service
  • Download Sentinel-1 GRD data using Vertex
    • You may use this Sample Granule
      • If you choose to download a granule other than the sample granule, you will need to determine an appropriate projected coordinate reference system to use for that location (i.e., UTM Zone). If this is an unfamiliar concept, you may wish to use the sample granule provided.
    • When downloading from Vertex, you must either already be logged in to Earthdata, or you will be prompted to enter your Earthdata Login username and password before the download will begin.

Geocode steps

Download Sentinel-1 Data

Using Vertex, download a Sentinel-1 GRD granule. Note that you will need to log in with your Earthdata credentials before the download will begin. The download will be served as a .zip file.

Extract the .tif File with the Data of Interest

Within the downloaded zip file is a base directory with the name of the granule followed by a .SAFE extension. This SAFE structure contains a number of directories and files, and the data images are saved as georeferenced .tiff files in the folder named “measurement.”

The image we are interested in for this tutorial is the co-polarized GRD:

s1a-iw-grd-vv-20170819t001029-20170819t001054-017985-01e2e8-001.tiff

Note: If you are using a different granule than the sample provided, the co-pol image may be labeled hh instead of vv.

This image shows the contents of the GRD SAFE file, within the downloaded .zip file
Image Caption

Contents of the GRD SAFE file, within the downloaded .zip file

Use your preferred method to extract the desired file from the zipped folder, or see below for suggestions:

Contents of the GRD SAFE file, within the downloaded .zip file

Unzipping with OS X or Linux

Using the Unix unzip utility (also works with OS X) in the command terminal, you can extract just the file you want from the downloaded zip folder (filename .zip) with a command like this:

unzip <filename.zip> */measurement/*vv*.tiff

This will extract just the VV polarized image from this zip package. If you know which file you want, this is usually much faster than extracting the whole zip file.

Unzipping with Windows 10

If you unzip the entire folder with the standard Windows 10 zip utility, there is a good chance that you will exceed the number of characters allowed in a Windows directory path. You can either save the zipped contents to a different folder, or you can just extract the single file as follows:

  1. Double-click the .zip file in your Downloads folder, double-click the .SAFE file, double-click the measurement folder and highlight the desired .tiff file.
  2. Under the Compressed Folder Tools menu (which appears when you browse into a zip file), click the Extract button, and select the Extract To… option.  
  3. Select one of the recent folders (which will start the extraction immediately), or use the Choose Location option at the bottom of the dialog box to navigate to the desired extraction location and click the Copy button to extract the file. 
  4. The single .tiff file will be extracted from the zipped folder structure.

    You may also wish to download the 7-Zip File Manager for a more flexible zip utility than the standard Windows zip utility, especially if you have a Windows operating system earlier than Windows 10.
This image shows the compressed Folder Tools menu within the measurement folder in the downloaded .zip file.
Image Caption

The compressed Folder Tools menu within the measurement folder in the downloaded .zip file.

Project your Product

  1. Open QGIS 2.18
  2. In the Raster menu, select Projections > Warp (Reproject). 

    Note: If your Raster menu doesn’t have the Projections options, you may not have installed and/or activated the GdalTools plugin. See Prerequisites.
     
  3. Enter the parameters into the dialog window.
    1. If you added your input raster to your QGIS canvas, select it from the dropdown list of layers; otherwise, click the Select button next to the field, browse to the image to be projected, and click the Open button. (a)
    2. Type in the output path/filename, or use the Select button to browse to the target directory, then type in the filename. Make sure to add the .tif extension to the filename. (b)
    3. If the input file has been entered, the Source SRS option should already be enabled and the European Petroleum Survey Group (EPSG) code populated with 4326 (WGS 84). If it is not, enter EPSG:4326 in the field, or click the Select button and filter for 4326. (c)
    4. Click the checkbox to enable Target SRS, and click the Select button to look up the desired projection. (d)
This image shows the QGIS 2.18 Warp (Reproject) dialog window
Image Caption

QGIS 2.18 Warp (Reproject) dialoQGIS 2.18 Warp (Reproject) dialog window

The sample granule provided is located in Louisiana, which is UTM Zone 15N (EPSG 32615). If you used a different granule, you will need to determine the appropriate projection or UTM zone for its location.

  • If you know the EPSG number of the desired projection, you can type that number into the Filter field and press Enter to locate the projection. Highlight the desired coordinate reference system (CRS) and click the OK button.
  • If you are not using the sample granule: If you have a different image already projected in the appropriate reference system for the area covered by your chosen granule, you can reference the CRS used for that image. Navigate to the image in the Browser Panel, right-click on the layer, and select Properties. Scroll down to the Layer Spatial Reference System, and copy the line of text, which defines the projection. Paste that text directly into the Target SRS field in the Warp dialog box.

   5.  Enable the resampling method and set it to Bilinear. (e)

   6.  Enable the No data values option and set it to 0. (f)

  • This option sets any additional padding pixels added around the edges during the warp process to No Data instead of 0 values.
  • This option does not process any of the incoming 0 values already serving as a mask in the input image served by Vertex.
This image shows how to select the target SRS dialog — QGIS 2.18
Image Caption

Select the target SRS dialog — QGIS 2.18

This image shows how to find the spatial reference definition in the layer properties of a projected image and using it as the Target SRS
Image Caption

Finding the spatial reference definition in the layer properties of a projected image and using it as the Target SRS

   7.  If you want to add any additional options available in the gdalwarp command that is being compiled as changes are made in the dialog box, you can access the command code directly by clicking the Edit button next to the code pane. (g)

This image shows how to access the gdal command directly in the code pane
Image Caption

Accessing the gdal command directly in the code pane

Note: This functionality was lost starting with QGIS 3.0

  • For more detailed instructions on the use of the gdalwarp command, refer to ASF’s GDAL version of this data recipe. Some of the additional options you may want to consider include:
    • -tps specifies the use of the thin plate spline technique for interpolating the ground control points in the TIFF.
    • -tr specifies the output pixel size, in the units of the output projection; an option of -tr 10 10 when projecting to UTM outputs 10×10 meter cells
    • -srcnodata sets the mask values in the input TIFF to No Data. Granules downloaded from Vertex may have had 0 values added to mask bad pixels, and by adding the -srcnodata 0 option into the command, those mask pixels will be output as No Data instead of 0 values.

Note: ESA has applied different masks to the Sentinel-1 Level-1 products over time. While it is always okay to set the 0 values to No Data, older products will have more garbage pixels left over even when this option is applied. Only with IPF version 2.90 (March 2018) did ESA start masking all of the artifacts at the image edges with 0 values.

   8.  Once all the parameters are entered, and any desired changes/additions to the command have been typed into the code pane, click the OK button to run it.

This series of images shows different Nodata Settings. Series 1 is an image processed by ESA with IPF 2.82, Series 2 is an image processed by ESA with IPF 2.91. In each series, A was projected with neither nodata option applied, B was projected using only the -dstnodata option, and C was projected with both -srcnodata and -dstnodata options applied.
Image Caption

Different Nodata Settings. Series 1 is an image processed by ESA with IPF 2.82, Series 2 is an image processed by ESA with IPF 2.91. In each series, A has had neither nodata option applied, B has had only the -dstnodata option applied (which is the option used by the Nodata setting in the QGIS 2.18 Warp tool interface), and C has had both nodata options applied. In QGIS 2.18, you must manually add the -srcnodata option.

Details

Last Updated

Published on

Data Centers

Alaska Satellite Facility DAAC (ASF DAAC)