How to use a CQL filter in WFS?

How to use a CQL filter in WFS?

CQL (Common Query Language) is an extension provided by the Geoserver software we use in LDS. CQL is a basic query language which is simple and fast to read and write and looks very similar to SQL. Here’s a WFS GetFeature request using a CQL filter (note the HTTP “cql_filter” parameter).

How to filter for primary parcels in WFS?

Here’s a WFS GetFeature request using a CQL filter (note the HTTP “cql_filter” parameter). The NZ Primary Parcels layer includes current primary parcels that are intended for one of a range of purposes, including Crown ownership, lake or river, or road or railway.

Can a script create a WFS filter on the fly?

Any programming language that can make web requests can use WFS and apply filters to these requests. Because the WFS URL is just a string of text characters, the URL including the filter can be created on the fly by a script in response to user input or predetermined logic.

How to add parameters to a WFS request?

An introduction to some of the parameters you can add to your Web Feature Services (WFS) request to filter data on the fly, filter methods and the tools you can use to run them. A basic WFS 2.0 GetFeature URL for requesting data has the following syntax:

When to use WFS filtering by attribute or feature?

WFS filtering by attribute or feature. WFS advanced operations allow you filter your query by attribute or value. This is particularly useful when you are only interested in a subset of the data within an LDS layer or table.

Is it possible to filter by feature or attribute?

View our data Dictionaries on the LINZ Data Service. In most cases, unless columns have a small number of unique values, you know the feature you’re looking for or you are familiar with the data, filtering based on specific feature values is not practical.