Subsetted Unwrapped Phase Sentinel-1 InSAR product (black & white) layered on the original Sentinel-1 InSAR Unwrapped Phase product (color)
ASF has pre-processed Sentinel-1 Interferograms (S-1 InSAR) available for download. This recipe goes through the basic steps of constructing a Harmony request URL to find S-1 InSAR data that falls within an area and time period of interest and perform variable and spatial subsetting on the data using the GDAL Subsetter.
Source: T. Stern, ASF
Level: ◆ Advanced
- Sentinel-1 InSAR Products (ARIA)
- GDAL Subsetter
- URL Construction
- Standard Components
- Optional Components
- Processing Steps
Sentinel-1 InSAR Products (ARIA)
The Alaska Satellite Facility (ASF) has a targeted collection of pre-processed Sentinel-1 Interferograms (S1 InSAR) available for download. These products are generated by Jet Propulsion Laboratory’s ARIA Science Data program, and can be downloaded from ASF Vertex Data Search in their original netCDF format, or as individual GeoTIFF files. The individual products and netCDF layers include Unwrapped Phase, Coherence, Amplitude, and Connected Components.
In some cases, the spatial extent of these Sentinel-1 InSAR data products is larger than the user’s area of interest, or the user may only be interested in a subset of the variables (data layers) included in the netCDF file. By subsetting the dataset spatially and extracting only the netCDF variables of interest before the product is downloaded, the size of the download can be significantly reduced.
Harmony is a cloud-based data transformation framework that can be leveraged by different NASA data providers to offer a streamlined user experience regardless of the data source. NASA’s Earth Observing System Data and Information System (EOSDIS) supports 12 different Distributed Active Archive Centers (DAACs), each of which specializes in archiving and serving particular data types or topics. While datasets can differ significantly from one DAAC to another, some functionality can be consistently applied to a wide range of these datasets. Developing and sharing services in a common framework that can be used by all of the DAACs reduces duplication of effort and offers a more consistent experience for data consumers.
The GDAL Subsetter is a Harmony service developed by ASF that is currently configured for use with specific collections of S1 InSAR, UAVSAR and AVNIR-2 data with netCDF and GeoTIFF file formats. It allows users to extract spatial and/or variable subsets and to reproject the data if desired.
By accessing the GDAL Subsetter through Harmony, users can find S1 InSAR data that is within their area of interest and a temporal range, then generate products that are subsets of the variables and/or spatial extent of the original data products. Subset products are a fraction of the original data volume and can be downloaded more quickly and managed more easily. This recipe goes through the basic steps of constructing a Harmony request URL to find S1 InSAR data that falls within an area and time period of interest and perform variable and spatial subsetting on the data.
- Earthdata Login username and password
- If have not already registered, go to https://urs.earthdata.nasa.gov/users/new
- Access to ASF data, including the S-1 InSAR collection, requires that you accept the ASF End User License Agreement (EULA). If you have already done this, skip this step. If you have not agreed to the EULA:
The individual components of the Harmony request URL for the GDAL Subsetter are outlined below:
- The base URL for harmony is https://harmony.earthdata.nasa.gov/
- The short name for the S1 InSAR collection is Sentinel-1_Interferograms. It is included in the next position of the URL and is followed by /ogc-api-coverages/1.0.0/collections/.
- The S-1 InSAR products have four variables, corresponding to the layers of the netCDF. Each of the variables is preceded by ‘science/grids/data/’ in the URL. The four variables are: amplitude; coherence; connectedComponents; and unwrappedPhase. Multiple variables can be subset by including a comma-separated list and will be output as individual bands in the product GeoTIFF.
- Note: The ‘/’ characters in the variable string need to be URL encoded to ‘%2F’. The URL encoding for a comma is ‘%2C’.
- For example, a URL containing the two variables amplitude and coherence would be:
- For this exercise, the unwrappedPhase variable is subset with:
- The variable(s) in the URL is followed by /coverage/rangeset?
- Spatial subset: The GDAL Subsetter currently allows users to perform spatial subsetting by including a bounding box in the form ‘subset=lat(min:max)&subset=lon(min:max)’, with latitude and longitude values applying to the WGS84 coordinate reference system.
- For this exercise, the subset bounding box is:
- For this exercise, the subset bounding box is:
- Temporal subset (optional): Temporal filtering of the dataset is available to bound potentially large numbers of returns. Whether or not temporal filtering is used, results will be returned in chronological order according to the start date and time of data acquisition. A temporal range can be specified by including values according to the following format: subset=time(““:”“) with the and times formatted YYYY-MM-DDTHH:MM:SSZ
- For this exercise, the temporal range is:
- For this exercise, the temporal range is:
- Whether or not temporal filtering is used, the number of results can be large. The optional ‘maxResults’ parameter can be used to limit the number of results, which are returned in chronological order of acquisition (oldest first). Results in this exercise will be limited to 4 by using maxResults=4 .
Additional options for the request URL can be appended to the end in any order:
- Output format: Four output formats are available. For this exercise, the GeoTIFF output format will be used. The default format is NetCDF.
- Output image pixel numbers in columns and rows: If only width or height is specified, the aspect ratio of the product is preserved.
- &width=<# columns>&height=<# rows>
- Projected output: The GDAL Subsetter will project the output products to the projection of the input data file by default (WGS84 for S-1 InSAR), but the user can specify a different output projection if desired. The output coordinate system can be defined using any of the following three input formats:
- Force asynchronous processing: If the Harmony request is such that only one product will be generated, the processing will be done synchronously. As a result, the job history and STAC catalog will not be generated and, rather than download links being generated, the product will automatically download. To force asynchronous processing when only one product will be generated, for example, when maxResults=1 is used, use &forceAsync=True
- Assembly of the components described above yields the following Harmony request URL:
Copy the Harmony request URL in Step 1, paste it into a browser (Fig. 1), and hit <Enter>
2. Enter Earthdata credentials if not already logged in (Fig. 2).
3. Once logged in, the browser will start running the job. Refresh your browser as desired to monitor progress until the status is listed as “successful” and the progress value is 100 (Fig. 3).
4. Once the processing is complete, the browser window should include links to: 1) Job Status; 2) STAC Catalog; and 3) Products (Fig. 4). In this exercise, there should be four product links generated; the number of links generated will depend on the number of variables selected and the settings used for the temporal subset and maximum results when generating the URL.
- Open your GIS application
- Add the GeoTIFF product(s) to the map using your preferred method, or use one of the following approaches:
- QGIS: Click Layer > Add Layer > Add Raster Layer or click on the Add Raster icon, browse to directory containing subset image(s), select image(s) of interest and click <OK>.
- ArcMap: In the File menu, select Add Data > Add Data or click on the Add Data icon, and browse to the directory containing the subset image(s). Add a folder connection if necessary. Select image(s) of interest and click <Add>.
- ArcGIS Pro: In the Map ribbon, click the Add Data button, browse to the directory containing subset image(s), select image(s) of interest and click <OK>.
- If multiple variables were subset, individual bands can be displayed
- QGIS: Right-click on the product in the Table of Contents > Properties > Symbology. On the symbology tab, for Render Type select Singleband Grey and from Grey band select the variable band to display.
- ArcMap: Right click on the product in the Table of Contents > Properties > Symbology and select Show > Stretched and select the variable to display from the Band dropdown > Apply > OK
- ArcGIS Pro: Right click on the product in the Table of Contents > Symbology. Under Primary Symbology select Stretch, then select the variable to display from the Band dropdown and close the Symbology window.If multiple variables were subset, individual bands can be displayed
Note: Using symbology to display individual bands of a multi-band subsetted product is not currently working as expected in some ArcGIS Pro versions. If you have difficulty visualizing bands other than the first one with the Stretch approach, you can use an RGB symbology and set all of the bands to the band you would like to visualize. Alternatively, select Geoprocessing from the View tab, and in the Geoprocessing pane select Data Management Tools > Layers and Table Views > Make Raster Layer. In the tool, for Input raster, navigate to the multi-band GeoTIFF, name the Output raster layer, and from the Bands dropdown select the band you want to display and click <Run>.