Filter Encoding XPath Filter Processing Languages

98 Copyright © 2010 Open Geospatial Consortium, Inc. One way to solve this issue could be to convert the XPath expression into a simple XQuery expression. For example, if the XPath expression would be: [abc:PropertyX] then it could easily be augmented by prepending a list of namespace declarations according to the XQuery specification. The resulting XQuery expression would then be: declare namespace abc = http:www.opengis.netabc1.0; [abc:PropertyX] This requires a service to support XQuery transformations. However, this mechanism could also become an OGC extension of XPath that would be well-documented in the appropriate documents. As described in section 9.1.1, an XPath expression used to filter events needs to be evaluated by an Event Service to a boolean expression. The service can then unambiguously determine if a given event matches a subscription’s filter criteria. When using XPath as a filter language in an Event Service, the service should apply an implicit boolean function call to the results of an XPath expression – evaluated according to the XPath functions specification 6 .

9.2.3 Event Pattern Markup Language

Filtering not only single events but whole event streams is what the Event Processing domain is concerned with. The order of events in the stream, their timing as well as patterns that can be detected are of interest here, among others. Detection of event patterns allow the derivation of higher level information from low level events. Critical information shall be produced as soon as possible in order to react to it. Event processing nowadays is primarily concerned with financial applications. However, the techniques are more and more also used in other domains as well – also in the geospatial domain. The Event Pattern Markup Language EML; OGC 08-132 defines basic event processing functionality. The pattern language can be incorporated in processing languages like SensorML but may also extend the filter and processing functionality offered by OGC event services. When using EML, one should keep in mind that it is currently an OGC Discussion Paper and not an approved OGC Standard. Therefore, the concepts described in the specification as well as the markup language to express event patterns may change significantly in the future even though that may not be intended at this time. In addition, no standards have been defined in the event processing domain yet. In other words, there is no SQL for Event Processing – even though some vendors may claim that their 6 http:www.w3.orgTRxpath-functionsfunc-boolean Copyright © 2010 Open Geospatial Consortium, Inc. 99 products support such a thing. The EML was therefore developed based upon concepts that were identified to be common to multiple event processing languages. EML users should consider the language as a testing ground to improve the filtering and processing functionality of standards based geospatial services and applications. The functionality provided is especially interesting for use cases where critical information needs to be derived from the data produced by various sources and clients be informed about new information as soon as possible. The Sensor Web domain is an example where Event Processing has already successfully been tested see the OGC Sensor Event Service Discussion Paper, OGC 08-133. Other domains can benefit from the technology as well, for example the transportation domain.

9.3 Spatial Filtering of Events

9.3.1 Spatial Filtering via Bounding Box

Filtering published events based upon spatial filter criteria is a common use case. Especially in the geospatial domain events usually have a spatial context, in addition to their temporal context the event time. Events that are encoded as GML features share a common property: the boundedBy property of type GM_Envelope see figure D.45 in OGC 07-036. The GML 3.2.1 schema currently allows the inclusion of a spatial or spatio-temporal envelope bounding box of n dimensions as property value. In OWS-6 and OWS-7, the boundedBy property was used to perform spatial filtering of events. Several issues were identified with this approach. They are described in the following. First of all, filtering events using the boundedBy property is in most cases inexact. It depends upon the accuracy required as well as the extent of the two geometries that are used for filtering whether this inexactness is relevant or not. Consider the following figure.