Web Services for GIS¶

Web Map Service / Web Coverage Service¶

A Web Map Service (WMS) is an Open Geospatial Consortium (OGC) standard that allows users to remotely access georeferenced map images via secure hypertext transfer protocol (HTTPS) requests.

DE Africa provides two types of maps services:

• Web Map Service (WMS) - A standard protocol for serving georeferenced map images over the internet that are generated from a map server using data from a GIS database. It is important to note that with a WMS, you are essentially getting an image of geospatial data (i.e. JPG, GIF, PNG file). While this has its uses, it is an image only, and therefore does not contain any of the underlying geospatial data that was used to create the image.

• Web Coverage Service (WCS) - A standard protocol for serving coverage data which returns data with its original semantics (instead of just pictures) which may be interpreted, extrapolated, etc., and not just portrayed. Essentially, a WCS can be thought of as the raw geospatial raster data behind an image. Using a WCS, you can pull the raw raster information you need to perform further analysis.

So, to give a quick summarisation, a WMS is simply an image of a map. You can almost think of this like taking a screenshot of Google Maps. A WCS is the raw raster data, so for example, if you are working with a WCS containing Landsat imagery, you can effectively chunk off the piece you are interested in and download the full multispectral image at the spatial resolution of the original image. The beauty of these services is that you can grab only the information you need. So, rather than retrieving a file that contains the data you are seeking and possibly much more, you can confine your download to only your area of interest, allowing you to get what you need and no more.

The tutorials below cover:

• Setting up WMS

• Adding WMS-T (time-supported) layers

• Connecting to WCS

The tutorials have been created with QGIS3. The same processes can be used to connect other Desktop GIS applications. QGIS is a free and open-source desktop GIS application. You can download it from https://qgis.org/en/site/.

Tutorial: Setting up WMS¶

This tutorial shows how to set up the Web Map Services in QGIS, and use it with other data on your computer such as drone imagery, vector or raster data. This may be useful for you if you cannot upload the data to the DE Africa Map or the DE Africa Sandbox due to uploading due to size or internet bandwidth. It may also be useful if you feel more comfortable doing analysis in a GIS application.

How to connect to WMS using QGIS

1. Launch QGIS.

2. On the Menu Bar click on Layer.

3. A sub-menu tab will show below Layer; click on Add Layer, choose Add WMS/WMTS Layer.

4. A dialogue will open as shown below. Click on the New button.

5. A dialogue will open, as shown below: Provide the following details, these can be found at the URL https://ows.digitalearth.africa/.

Name: DE Africa Services

URL:  https://ows.digitalearth.africa/wms?version=1.3.0

6. After providing the details above, click on OK.

7. The previous dialogue will show up, in the dropdown above the New button, you will see DE Africa Services. If it is not there click the dropdown button below and select it.

8. The Connect button will be activated, click on it to load the layers. Anytime this page is open, because the connection has already been established, click on Connect to load the data.

9. The layer will be loaded as shown below in the dialogue.

10. Navigate through layers and choose the layer you will need to display on the Map Page.

11. After selecting the layer, click on Add button at the bottom of the dialogue.

12. Close the dialogue, the selected layer will be loaded onto the Map Page.

For web developers

The sites below provide instructions on how to load these map services onto your platform.

https://leafletjs.com/examples/wms/wms.html

https://openlayers.org/en/latest/examples/wms-tiled.html

https://docs.microsoft.com/en-us/bingmaps/v8-web-control/map-control-concepts/layers/wms-tile-layer-example

Tutorial: Add WMS-T (time-supported) layers¶

Digital Earth Africa web services support WMS-T (WMS with time). WMS-T layers allow users to navigate different time periods.

How to add WMS-T layers using QGIS

1. Connect to the Web Map Service in QGIS by following the instructions in Setting up WMS tutorial.

2. In the QGIS Browser Panel navigate to the WMS/WMTS provider item and expand it to show the DE Africa Services connection.

3. Select a WMS-T layer from the DE Africa Services connection layers by either double clicking on the layer item in the Browser Panel or right clicking on it and selecting Add Layer to Project to add the layer onto the map canvas.

4. The layer will be loaded in the Layers Panel with a clock symbol next it to indicate that it is a temporal layer.

How to use the QGIS Temporal Controller with WMS-T layers

To use the Temporal Controller for WMS-T layers, ensure that in the Temporal section of the layer’s Layer Properties, the Dynamic Temporal Control is selected. You can select the time range to be Automatic or Fixed time range.

For the Automatic setting, the temporal handling is delegated to the data provider and time based filtering is applied to the features of the layer such that the features will be visualized for the animation range set by the Temporal Controller.

For the Fixed time range setting the user manually sets the temporal range in which all the features of the layer will be visualised only if the animation range from the Temporal Controller is within this temporal range.

1. On the Map Navigation Toolbar select the clock symbol for the Temporal Controller Panel to activate the Temporal Controller dock widget.

Temporal controller dock widget activated after click on the Temporal Controller toolbar icon.

2. To turn on the Fixed range temporal navigation, select the Fixed range temporal navigation icon on the Temporal Controller Panel and set the time range for the layer features to be visualized.

3. To turn on the Animated temporal navigation, select the Animated temporal navigation icon on the Temporal Controller Panel, and set animation range and the time step for the animation.

4. Click on the Play icon to view the animation.

5. To rewind the animation to the beginning i.e. the start of the animation range, click on the Rewind to start icon .

6. To go back to the previous frame of the animation, click on the Go to previous frame icon . The time difference (time step) between consecutive frames is determined by the Step defined by the user.

7. To rewind the animation, click on the Reverse icon .

8. To go to the next frame of the animation, click on the Go to next frame icon . The time difference (time step) between consecutive frames is determined by the Step defined by the user.

9. To fast forward the animation to the end i.e. skip to the end of the animation range, click on the Fast forward to end icon .

How to export the animation from QGIS Temporal Controller

1. The animation can be exported from the QGIS temporal controller as a series of images. To export the animation click on the Export animation icon on the Temporal Controller Panel.

2. In the Export Map animation dialogue, specify:

• The naming template to be used for labelling the images.

• The output directory where the images will be saved.

• The map extent to be covered by the images.

• The width and height of the images.

• The temporal range and time step for the animation.

3. The exported images will be saved in the specified ouput directory. Using your preferred software, you can use the images to create an animation.

How to use the WMS-T layers in QGIS without the Temporal Controller

1. To use the WMS-T layers in QGIS without the Temporal Controller, first disable the Dynamic Temporal Control in the layer’s Layer Properties to enable the Static WMS-T Temporal Range settings. The default setting is the Server default temporal range for visualizing the layer features. This is a predefined temporal range set by the data service provider.

You will notice after disabling Dynamic Temporal Control that the layer no longer has the temporal indicator symbol next to the layer name in the Layers Panel, this means that the layer is no longer considered a temporal layer by QGIS, hence can’t be used by the Temporal Controller.

2. Using the Predefined range you can set the temporal range for the layer features to be visualized using the Start date and End date. A time-based filter will be applied to the layer and the fetched features will be the features within the predefined temporal range.

3. To use the Follow project’s temporal range setting, the project temporal range in the Temporal section (Project > Properties> Temporal) of the Project Properties must be set. After setting the project temporal range, applying this setting will result in fetching the WMS layer features that are within the projects temporal range.

WMS-T Settings

You can also specify the time slice mode used for both the Dynamic Temporal Control and the Static WMS-T Temporal Range. There are four options available for the time slice mode:

• Use Whole Temporal Range: Allows the user to set the temporal range for the layer features to be visualized/plotted.

• Match to Start of Range: The layer features visualized will be features that match the start of the layer’s time range.

• Match to End of Range: The layer features visualized will be features that match the end of the layer’s time range.

• Closest Match to Start of Range: Visualizes the layer features whose date and time stamp are the closest to the start of the defined temporal range.

• Closet Match to End of Range: Visualizes the layer features whose date and time stamp are the closest to the end of the defined temporal range.

You can also enable the option for Ignoring time components which allows QGIS to only consider the dates when applying a time based filter to the layer features based on a defined temporal range, without considering the time component.

Tutorial: How to connect WCS¶

How to connect to WCS using QGIS

1. Launch QGIS.

2. On the Menu Bar click on Layer.

3. A sub-menu tab will show below Layer; click on Add Layer, choose Add WCS Layer.

4. Click on the New button.

5. A dialogue will open, as shown below: Provide the following details, these can be found at the URL https://ows.digitalearth.africa/

Name: DE Africa Services

URL:  https://ows.digitalearth.africa/wcs?version=2.1.0

6. After providing the details above, click on OK.

7. The previous dialogue will show up, in the dropdown above the New button, you will see DE Africa Services, if it is not there click the dropdown button below and select it.

8. The Connect button will be activated, click on it to load the layers. Anytime this page is open, because the connection has already been established, click on the Connect button to load the data.

9. The layer will be loaded as shown below in the dialogue.

10. Navigate through layers and choose the layer you will need to display on the Map Page. With WCS you can select Time and Format of Image.

11. After selecting the layer click on the Add button at the bottom of the dialogue.