1

At the moment I am working on a school project and I want to customize a WFS-url. The WFS-url (https://service.pdok.nl/lv/bag/wfs/v2_0?request=GetCapabilities&service=WFS) shows five featureTypes when you insert it in ArcGIS Pro and I want to work with the 'pand' (Building) featureType.

The pand featureType shows information of buildings in the Netherlands and I want to filter every bouwjaar (construction year) of a building GreaterThanOrEqualTo 1994, see the image.

I've tried a lot of combinations but can't seem to figure out if its possible. Does anyone have a solution?

The Column i want to filter

4
  • You need to add a filter to your query, your GIS should be able to do this automatically (well QGis can anyway) Commented Dec 12, 2023 at 10:44
  • Tnx Ian! I will try QGIS instead of ArcGIS Pro Commented Dec 12, 2023 at 12:23
  • ArcGIS can filter. Right click layer, properties, definition query. Commented Dec 12, 2023 at 21:34
  • Note that a WFS is not a shapefile. A shapefile is a specific data format stored on your filesystem. In Esri terminology, a WFS is a type of "feature class". A shapefile is also a feature class, as are other data formats such as geojson. Commented Dec 12, 2023 at 21:38

1 Answer 1

2

As noted by @user2856 in comments, in ArcGIS Pro you can apply a Definition Query to your WFS data to get the set of results you want:

Definition Query in ArcGIS Pro

This may be all you actually want to do, it isn't though applying any filter to the WFS service, but instead it is applying a query to the data that has already been downloaded.

If you use QGIS, you can use the Build query tool to add SQL to the query, which is translated as an actual filter in the WFS request.

WFS filter query in QGIS

You can see from the QGIS debugger the actual filter requests sent to the WFS server. You can see that QGIS splits the requests into chunks (paging).

An example request might be:

https://service.pdok.nl/lv/bag/wfs/v2_0?SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=bag:pand&STARTINDEX=4000&COUNT=1000&FILTER=%3Cfes:Filter%20xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22%3E%0A%20%3Cfes:PropertyIsGreaterThanOrEqualTo%3E%0A%20%20%3Cfes:ValueReference%3Ebouwjaar%3C/fes:ValueReference%3E%0A%20%20%3Cfes:Literal%3E1994%3C/fes:Literal%3E%0A%20%3C/fes:PropertyIsGreaterThanOrEqualTo%3E%0A%3C/fes:Filter%3E%0A
1
  • 1
    @BERA odd, the debugging tool is automatically on for me. You should be able to toggle it on/off using the record button (red dot) Commented Apr 2, 2024 at 12:54

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.