Select to view content in your preferred language

ArcGIS Pro - WFS parameter query to filter data

815
3
01-19-2024 02:54 AM
Labels (2)
DanHardwick
Occasional Contributor

Hi all, 

In ArcGIS Pro I am connected to an external WFS, and I can go into the parameters and set things like a BBOX to bring in only the area of interest, but I want to query/filter the data to bring in only certain features. Essentially like you would use a definition query a standard layer to say 'Theme = 'Building'. 

I have found a post where it looks possible, such as using a CQL query in method 2 - https://esribelux.com/2021/04/23/filter-data-wfs-in-arcgis-pro/ 

But this doesn't work for me, when I try to add it as a parameter like so:

DanHardwick_0-1705661564877.png

 

It changes it to this:

DanHardwick_1-1705661585676.png

It still bring in the data, but is hasn't been queried so bring in the whole dataset. The data contains a lot of features so bring in all the features then querying it is not really feasible, so hoped to pre-query the WFS before bringing it in. 

Any ideas please?

Thanks, Dan

Tags (3)
3 Replies
JustinOdell
Frequent Contributor

I have the same query. 

I can bring a WFS into ArcGIS, then apply a Definition Query to get the result I want. Alternatively when adding a WFS Server to ArcGIS Pro, I can add a custom parameter to the WFS using cql_filter and achieve the same result. 

When I try the same method in ArcGIS Map Viewers I am unable to achieve the same result.

When I try QGIS, the 'Provider Feature Filter' appears to be SQL-based, and I can achieve the desired output, but I am unable to figure out how to convert between SQL and cql expressions.

DanHardwick
Occasional Contributor

I never found a solution to getting this to work in ArcGIS Pro. I did like yourself have more luck in QGIS, and pretty much got what I needed from doing it within there. 

0 Kudos
JustinOdell
Frequent Contributor

I recently discovered some of the issues were related to map viewers on Enterprise 10.9.1. When using ArcGIS Online I had better luck, but still a bit hit and miss with some queries.

In my experience it seems different applications handle the filtering of WFS differently. 

0 Kudos