7 A Quality-enabled Spatial Integration System
141
Next, subqueries of the GEP are processed by the Rewriting module in order
to be expressed in terms of source schemas. This is performed by this module in
using the mapping rules; global to local bindings are also computed at this stage.
Hence, we obtain a local execution plan for each ESQ of the global execution plan.
Each local execution plan is a combination of queries over source schemas using
joins, unions, and other (possibly spatial) operations. The Mapping/Reformulation
module reformulates these queries such that the results are compliant with the global
schema. This leads to a final execution plan which may be composed of three kinds
of queries:
1. HTTP queries are WFS queries in charge of extracting a feature from a local
source. These are processed by the WFS Query Engine.
2. GQuery queries are (mainly) used to express spatial operations, and are processed by the GQuery engine.
3. JOIN queries play a central role in the execution plan. Since we are handling
a large amount of data, and because existing XQuery implementations do not
supply efficient join modules, we implemented a specific Join engine.
The final execution plan is then processed by the Execution module, which is
in charge of dispatching the queries to the appropriate engine. This module uses a
cache repository to save temporary result of the different queries. When the execution
is finished, the Recomposition module eliminates the duplicated answers and returns
a GML file that can be either processed (if needed) or simply (generally) displayed
by a GML viewer.
7.5.2 Query Language
In the VirGIS system, we are using GQuery, a spatial query language based on
XQuery [39], that allows users to perform both attribute and spatial queries against
GML documents. Spatial semantics is extracted and interpreted from XML tags without affecting XQuery syntax, that is a spatial query looks like a regular XQuery
expression.
A GQuery sentence is composed of expressions, each of them being built-in or
user-defined functions. An expression has a value, or generates an error. The result of
an expression can be the input of a new one. A value is an ordered sequence of items.
An item is a node or an atomic value [36]. There is no distinction between an item
and a sequence containing one value. There are seven types of nodes: document, element, attribute, text, comment, processing-instruction, and namespace nodes. Writing a query consists of combining simple expressions (like atomic values), XPath expressions [36], FLOWER expressions (For-Let-Where-Return), test expressions (ifthen-return-else-return), or (pre-or user-defined) functions. Non-spatial operators are
arithmetic operators (+,−,×,/,mod), operators over sequences (concatenation, union,
difference), comparison operators (between atomic values, nodes, and sequences),
and Boolean operators.
Précédent

- 136/317

Suivant