Comparison Operators
The good ones go into the pot, the bad ones go into your crop
Last updated
The good ones go into the pot, the bad ones go into your crop
Last updated
Remember , where I compared XML Filter Expressions with SQL.
Investigating WFS capabilities in shows us, which comparison operations are supported by the WFS, e.g.
Now, we will have a look at some Comparison Operators. As they are easy to understand, we look only at a small selection.
To do so, we will use our traffic meter WFS again.
WFS URL
Version
2.0.0
Features Types
Zaehlstellen (counting points)
Max Features
leave blank
xmlns
ms="http://mapserver.gis.umn.edu/mapserver"
To recap, remember the Filter Expression we already used
PropertyIsEqualTo works similar to the equal operator ("=") in SQL.
Any feature which exactly matches the Filter Expresssion is returned.
PropertyIsBetween defines a range of values for 1 attribute by a
LowerBoundary
UpperBoundary
As our traffic meter WFS uses ascending integers for the counting point number (ZSTNR), we are able to cut out a piece like this
Wildcards are really useful! The PropertyIsLike operator allows you to do pattern matching.
In our traffic meter WFS the attribute "ERFASSART" describes the type of traffic meter in combination with year dates, e.g. "2017".
Let's select all traffic meters containing "2017" in ERFASSART, no matter of the position within the description.
Let's try another example. This time parking decks in Hamburg.
WFS URL
Version
2.0.0
Features Types
verkehr_parkhaeuser (parking decks)
Max Features
leave blank
xmlns
de.hh.up="https://registry.gdi-de.org/id/de.hh.up"
preise (de) = fees (en) kostenlos (de) = free of charge (de)
We want to select only those parking decks with no fees at least for the first 30 minutes.
If you struggle with umlauts (ÄÖÜäöüß) in Comparison Operators, please try wildcards (PropertyIsLike) instead!