Using WFS in QGIS

Reducing the number of features fetched.

While WFS normally is rather easy to use in QGIS there are some situations that need a bit of attention. Many WFS servers only allow a limited amount of features to be fetched. Since QGIS fetches the data the first time the WFS is loaded, it is important to zoom in to the area you want data for to reduce the number of fetches. There is normally no warning if you have hit the limit. It is therefore recommended to open the properties of the layer and look at the feature count. If it is a suspiciously round number, e.g. 3000 or 5000 it indicates a limit has been reached.

Defining a SQL query on the data

If you have not used SQL before please read the article “Filtering data using SQL

Another way of reducing the number of features fetched is to add a query on the WFS layer. This is one of QGIS’s peculiarities but this can not be done from the browser. You need to go to the data source manager (from the layer menu, chose “Data Source Manager” )

Select the data source (Red) and connect to it (blue) select the layer (green).click the build query (orange). After you build the query it will be displayed after the layer name (pink)

The query builder can be a bit intimidating, but first click in the where clause area (pink) then select a collum that can be bused for reducing the number of features. In this case the municipality (kommune) Red

The column appears in the where clause area and you can then type the condition the column must meet. In this case =’Roskilde’. Note the use of single quotes. and press ok.