OGC Web Feature Service


Publish geospatial vector data from data stored on server to the client.

Mandatory parameters for the data request:

  • TYPENAME - list of feature types

Optional parameters:

  • BBOX

WFS Server should be able to handle 3 types of requests:

  • GetCapabilities - retrieves server metadata (encoded as XML document)
  • GetFeature - retrieves vector data
  • DescribeFeatureType - retrieves schema of the database
  • LockFeature - for editing
  • GetFeatureWithLock - get fetaure and lock it

Testing OGC WFS directly

Since we deployed our service as WFS too, we should be able to download Roads data as GML. The GetCapabilities request should look like:
map=NAME/project.qgs&         <-- NOTE: this is not part of the WFS standard

Concrete example in our case:

Now we can download layer Primary_road as GML file:

Adding WFS layer to QGIS


It’s worth to start a new empty QGIS project for this step to avoid confusion by all the layers you may have in the layer switcher.

  1. Add new WFS server (Layer ‣ Add WFS Layer ‣ New server)

  2. Select required layer


    Fig. 77 Select e.g. Primary_road layer (or more, if you want)

  3. As result - you have new layer from the WFS server in your map

  4. If enabled, QGIS is even able to update the data and send them back to the server (using WFS-T standard)