Filter Encoding

Geography Markup Language allows you to encode geographic data, and a web feature service enables you to manipulate that data; but how do users find your “manipulated”, GML-encoded geographic information?

To find geographic content online, users generally issue an Internet-wide search. There must be a common means for those searches to be specified so that servers will understand them. OGC is developing specifications that define services that must be supported by geographic search servers.

OGC’s Filter Encoding specification is a means of defining what those properties are; it is used to filter the objects out of geospatial servers. It is an XML encoding of OGC’s Common Query Language; in other words, it is an XML schema for creating a query about spatial objects to pass to a web service. Filter encoding provides:

  • The ability to group objects from a gazetteer or web registry se_f2rvice; and
  • A common way to filter data from search servers.

Search servers may describe geographic objects using a set of attributes. The filter constrains those attributes using the following query properties:

  • Spatial measures (for example, any matching object must be contained within a specified bounding box), encoded in GML;
  • A comparison of numerical values or date/time descriptors;
  • Matching of text descriptors or feature identifiers;
  • Logical operators for Boolean comparisons;

One or more of the attributes from the catalogue may be used in expressions or functions defined by the filter. The filter may then apply comparison or matching operators to the outcome of those expressions or functions.

Sample filter queries

  1. Given that I am here (a specific location), what police district, or other administrative zone am I in?

  2. Give me the exact boundaries and contact information for the Ministry of the Environment’s South-Central District.

  3. Give me the exact boundaries and contact information for the Ministry of Transportation’s district that overlaps the Ministry of the Environment’s district.

  4. Give me the names, locations and phone numbers of all Thai restaurants within 3 kilometres of this location.