Working with WFS in context

“QGIS can connect to remote services allowing you to access the layers and then load them locally spatial layers.”

The Web Feature Service (WFS) represents a change in the way geographic information is created, modified and exchanged on the Internet. Rather than sharing geographic information at the file level using File Transfer Protocol (FTP), for example, the WFS offers direct fine-grained access to geographic information at the feature and feature property level. In QGIS you can set up a connection to a remote service and access the data. In some cases, the access to the data is prohibited and you have to acquire authorization to get the data.

In this module, we will explore remote data by accessing it over the WFS protocol.

You try:

Goal: To explore remote layers in QGIS

  • Click on the WFS connection in the Manage Layers Toolbar or in the Layers menu > Data Source Manager
  • Alternatively you can use the Browser to create a new WFS connection.
  • Add the URL using the examples given in the specification. Use the first URL provided.
  • Select the layer Kenya-Admin Level 3
  • Add the layer to QGIS and zoom to the extent of the layer.
  • Right-click on the layer and open the attribute table.
  • Navigate to the symbology of the layer. Change the symbology of the layer.
  • Navigate back to the WFS connection you have established.
  • Select the layer Kenya Admin Level 2
  • Click on the option build query and see if you can build a query that only selects a single polygon where "NAME_1" = 'Nyeri'
  • Load the resultant layer into QGIS

Name Expectation

ICPAC

http://geoportal.icpac.net/geoserver/wfs?

More about WFS data in QGIS

In this module, we accessed remote data using the WFS protocol and loaded it locally. In order to access the data, users have to be connected to the internet unless the remote server is on the local network. In this module when we clicked on the WFS connection and it returned a list of layers in which we choose a single layer or a couple of layers to load them into QGIS. The property of the WFS which we have just used is called GetMap. The WFS protocol has other properties besides the GetMap. Here is a list of the other properties of the WFS listed below.

Property Use
GetFeature Get geographic data from the server
GetCapabilities Returns metadata about the service ie CRS of layers and number of layers configured
Transaction Allows users to manipulate the data based on CRUD operations
DescribeFeatureType discovery operation

Most GIS software has servers which are capable of serving data using the WFS protocol. Below are a few examples

Software Notes
QGIS Server Works in sync with QGIS
GeoServer Nice user interface
MapServer No GUI. Very fast

Check your knowledge:

  1. Is it possible to delete records accessed from WFS:

    1. No, it is not allowed
    2. Yes, provided the right authorisation has been set on the server
    3. It is possible only if the remote server is using layers from the database
  2. Which of the following statements is true:

    1. A GIS server can only be deployed on the internet and this will provide the WFS
    2. The maximum rows that can be shows in a WFS table in QGIS is 100 records
    3. The size of the server and speed of the internet determines how fast your features will render when being accessed through WFS
  3. Which of the following is an advantage of using WFS:

    1. Multiple people from different locations can access the same data
    2. Editing data can not be done simultanously on the same layer
    3. The data accessed through WFS has the same style and this help users understand what features were being mapped