O'Reilly logo

OpenLayers Cookbook by Antonio Santiago Perez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Filtering features in WFS requests

A key concept when working against a WFS server is the concept of filters.

Among many other specifications, the OGC has defined a standard that defines the notation to be used for filtering, the Filter Encoding Specification.

Filters are similar to the WHERE clause in SQL and allow us to select features that meet some conditions.

Note

You can find the Filter Encoding Specification on the OGC website available at http://www.opengeospatial.org/standards/filter.

As we will see in Chapter 7, Styling Features, filters are not only used to query features but are also used to define rules to style them.

OpenLayers offers a set of classes suited to work with the filters the specification defines: property filters (PropertyIsEqualTo ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required