4.5.8. XML query expressions¶
A query expression is an action that directs the export operation to
search the 3DCityDB for city objects that satisfy some filter expression
encoded within the query. Query expressions are given in XML using a
<query>
root element. The XML language used is specific to the
Importer/Exporter and the 3DCityDB but draws many concepts from OGC
standards such as Filter Encoding (FE) 2.0 and Web Feature Service
(WFS) 2.0.
Note
All XML elements of the query language are defined in the XML
namespace http://www.3dcitydb.org/importer-exporter/config. Simply
define this namespace as default namespace on your <query>
root element.
A query expression may contain a typeNames parameter, a projection clause, a selection clause, a sorting clause, a counter filter, an LoD filter, an appearance filter, tiling options and a targetSrid attribute for coordinate transformations.
Element
|
Description
|
Lists the name of one or more feature types to query (optional).
|
|
Projection clause that identifies a subset of optional feature properties that shall be kept or removed in the target dataset (optional).
|
|
Selection clause that specifies criteria that conditionally select city objects from the 3DCityDB (optional).
|
|
Sorting clause to specify how city objects shall be ordered in the target dataset (optional).
|
|
Limits the number of requested city objects that are exported to the target dataset (optional).
|
|
Limits the LoDs of the exported city objects to a given subset (optional).
|
|
Limits the appearances of the exported city objects to a given subset (optional).
|
|
Defines a tiling scheme for the export (optional).
|
|
Defines a coordinate transformation (optional).
|
In addition, the following chapter discuss how to use address information and 3DCityDB metadata in query expressions:
Caution
XML queries are based on the CityGML XML schemas. For instance, feature and property names as well as property values and multiplicities follow the CityGML XML schema definitions. Likewise, value references in filter conditions must be given as XPath expressions based on the XML schemas. The alternative CityJSON encoding is not supported.