ISO 19143:2010
(Main)Geographic information - Filter encoding
Geographic information - Filter encoding
ISO 19143:2010 describes an XML and KVP encoding of a system neutral syntax for expressing projections, selection and sorting clauses collectively called a query expression. These components are modular and intended to be used together or individually by other International Standards which reference ISO 19143:2010. ISO 19143:2010 defines an abstract component, named AbstractQueryExpression, from which other specifications can subclass concrete query elements to implement query operations. It also defines an additional abstract query component, named AbstractAdhocQueryExpresison, which is derived from AbstractQueryExpression and from which other specifications can subclass concrete query elements which follow the following query pattern: An abstract query element from which service specifications can subclass a concrete query element that implements a query operation that allows a client to specify a list of resource types, an optional projection clause, an optional selection clause, and an optional sorting clause to query a subset of resources that satisfy the selection clause. This pattern is referred to as an ad hoc query pattern since the server in not aware of the query until it is submitted for processing. This is in contrast to a stored query expression, which is stored and can be invoked by name or identifier. ISO 19143:2010 also describes an XML and KVP encoding of a system-neutral representation of a select clause. The XML representation is easily validated, parsed and transformed into a server-specific language required to retrieve or modify object instances stored in some persistent object store. ISO 19143:2010 defines the XML encoding for the following predicates. - A standard set of logical predicates: and, or and not. - A standard set of comparison predicates: equal to, not equal to, less than, less than or equal to, greater than, greater than or equal to, like, is null and between. - A standard set of spatial predicates: equal, disjoint, touches, within, overlaps, crosses, intersects, contains, within a specified distance, beyond a specified distance and BBOX. - A standard set of temporal predicates: after, before, begins, begun by, contains, during, ends, equals, meets, met by, overlaps and overlapped by. - A predicate to test whether the identifier of an object matches the specified value. ISO 19143:2010 defines the XML encoding of metadata that allows a service to declare which conformance classes, predicates, operators, operands and functions it supports. This metadata is referred to as Filter Capabilities.
Information géographique — Codage de filtres
L'ISO 19143:2010 décrit un encodage en XML et KVP d'une syntaxe neutre de système destiné à exprimer des clauses de projection, de sélection et de tri collectivement appelées expression d'interrogation. Ces composants sont modulaires et destinés à être utilisés ensemble ou individuellement par d'autres normes que celles qui référencent l'ISO 19143:2010. L'ISO 19143:2010 définit un composant abstrait, nommé AbstractQueryExpression, à partir duquel d'autres spécifications peuvent sous-classer des éléments d'interrogation concrets pour mettre en ?uvre des opérations d'interrogation. L'ISO 19143:2010 définit également un composant d'interrogation abstrait supplémentaire, nommé AbstractAdhocQueryExpression, qui est dérivé du composant AbstractQueryExpression et à partir duquel d'autres spécifications peuvent sous-classer des éléments d'interrogation concrets qui suivent le modèle d'interrogation suivant: Un élément d'interrogation abstrait à partir duquel des spécifications de service peuvent sous-classer un élément d'interrogation concret mettant en oeuvre une opération d'interrogation permettant à un client de spécifier une liste de types de ressources, une clause de projection optionnelle, une clause de sélection optionnelle et une clause de tri optionnelle afin d'interroger un sous-ensemble de ressources qui satisfont à la clause de sélection. Ce modèle est désigné comme étant un modèle d'interrogation ad hoc du fait que le serveur n'est pas informé de l'interrogation jusqu'à ce qu'elle lui soit soumise pour traitement. Cela s'oppose à une expression d'interrogation mémorisée, qui est mémorisée et peut être appelée par un nom ou un identifiant. L'ISO 19143:2010 décrit également un encodage en XML et en KVP d'une représentation neutre de système d'une clause de sélection. La représentation XML est facilement validée, analysée et transformée en un langage spécifique au serveur requis pour récupérer ou modifier des instances d'objets mémorisées dans certains stockages d'objets permanents. L'ISO 19143:2010 définit l'encodage en XML pour les prédicats suivants: un ensemble standard de prédicats logiques: and, or and not (et, ou et non); un ensemble standard de prédicats de comparaison: equal to, not equal to, less than, less than or equal to, greater than, greater than or equal to, like, is null and between (égal à, pas égal à, inférieur à, inférieur ou égal à, supérieur à, supérieur ou égal à, comme, est nul et entre); un ensemble standard de prédicats spatiaux: equal, disjoint, touches, within, overlaps, crosses, intersects, contains, within a specified distance, beyond a specified distance and BBOX (égal, disjoint, touche, dans, chevauche, croise, intersecte, contient, à une distance spécifiée, au-delà d'une distance spécifiée et boîte englobante); un ensemble standard de prédicats temporels: after, before, begins, begun by, contains, during, ends, equals, meets, met by, overlaps and overlapped by (après, avant, commence, commencé par, contient, pendant, se termine, égal à, satisfait, satisfait par, chevauche et chevauché par); et un prédicat pour vérifier si l'identifiant d'un objet correspond à la valeur spécifiée. L'ISO 19143:2010 définit l'encodage en XML des métadonnées qui permettent à un service de déclarer les classes de conformité, les prédicats, les opérateurs, les opérandes et les fonctions qu'il prend en charge. Ces métadonnées sont désignées par le terme Capacités de filtre.
Geografske informacije - Kodiranje s filtrom
Ta mednarodni standard opisuje XMl- in KVP-kodiranje sistema nevtralne sintakse za izražanje napovedi, izbire in razvrščanje stavkov, skupaj imenovanih poizvedba. Te komponente so modularne in se skupaj ali posamično uporabijo v drugih standardih, ki se sklicujejo na ta mednarodni standard. PRIMER 1: ISO 19142 uporablja nekatere ali vse te komponente. Ta mednarodni standard opredeljuje abstraktno komponento, imenovano AbstractQueryExpression (abstraktna poizvedba), iz katere lahko druge specifikacije porazdelijo konkretne poizvedbene elemente v podrazrede za izvajanje poizvedbenih operacij. Ta mednarodni standard prav tako opredeljuje dodatno abstraktno poizvedbeno komponento, imenovano AbstractAdhocQueryExpresison (abstraktna ad hoc poizvedba), iz katere lahko druge specifikacije porazdelijo konkretne poizvedbene elemente v podrazrede, ki sledijo naslednjemu poizvedbenemu vzorcu: abstraktni poizvedbeni element, iz katerega lahko specifikacije storitev porazdelijo v podrazrede konkretne poizvedbene elemente, ki izvajajo poizvedbeno operacijo, katera omogoča stranki, da navede seznam vrst virov, izbirno napovedno klavzulo, izbirno klavzulo za izbor in izbirno klavzulo za razvrščanje za poizvedbo podsklopa virov, ki zadosti izborni klavzuli. Ta vzorec se navaja kot ad hoc poizvedbeni vzorec, ker strežnik ni seznanjen s poizvedbo, dokler ni predložena v obdelavo. To je v nasprotju s shranjeno poizvedbo, ki je shranjena in se lahko uveljavi z imenom ali označbo. Ta mednarodni standard prav tako opisuje XML- in KVP-kodiranje sistemsko nevtralne predstavitve izbrane klavzule. Predstavitev XML se zlahka potrdi, razčleni in pretvori v strežniško specifičen jezik, ki je potreben, da se ponovno pridobi ali spremeni primerke predmeta, shranjene v nekem obstojnem pomnilniku predmetov. PRIMER 2: XML-kodiran filter se lahko pretvori v KJE-klavzulo za izjavo SQL IZBERI za pridobitev podatkov, shranjenih v relacijski podatkovni bazi, osnovani na SQL. Podobno se lahko XML-kodiran izraz za filtriranje pretvori v izraz XPath ali XPointer za pridobitve podatkov iz XML-dokumentov. Ta mednarodni standard opredeljuje XML-kodiranje za naslednje predikate: a) Standardni sklop logičnih predikatov: in, ali ter ne. b) Standardni sklop primerjalnih predikatov: enak, neenak, manj kot, manj kot ali enak, večji kot, večji kot ali enak, kot, je nič in vmes. c) Standardni sklop prostorkih predikatov: enak, razčlenjen, se dotika, znotraj, se prekriva, prečka, seka, vsebuje, znotraj določene razdalje, zunaj določene razdalje in BBOX. d) Standardni sklop začasnih predikatov: po, pred, se začne, se je začel s/z, vsebuje, med, se konča, je enak, se ujema, se je ujemal s/z, se prekriva, se je prekrival s/z. e) Predikat za preskus, ali se označba predmeta ujema z določeno vrednostjo. Ta mednarodni standard opredeljuje XML-kodiranje metapodatkov, ki omogoča storitev, ki navaja, katere razrede skladnosti, predikatov, operacij, operandov in funkcij podpira. Ti metapodatki se navajajo kot zmožnosti filtriranja.
General Information
- Status
- Published
- Publication Date
- 07-Oct-2010
- Technical Committee
- ISO/TC 211 - Geographic information/Geomatics
- Drafting Committee
- ISO/TC 211/WG 4 - Geospatial services
- Current Stage
- 9093 - International Standard confirmed
- Start Date
- 04-Jul-2023
- Completion Date
- 13-Dec-2025
Overview
ISO 19143:2010 - Geographic information: Filter encoding defines a system‑neutral syntax and encodings for expressing query expressions used to project, select (filter) and sort geographic resources. The standard specifies both XML and KVP (key‑value pair) encodings and an abstract model (AbstractQueryExpression and AbstractAdhocQueryExpression) that other specifications can subclass. Its XML filter representation is designed to be easily validated, parsed and transformed into server‑specific query languages (for example SQL, XPath/XQuery).
Key topics and technical requirements
- Query components: modular encodings for projection clauses, selection (filter) clauses and sorting clauses that can be used together or independently.
- Abstract model: AbstractQueryExpression and AbstractAdhocQueryExpression let service specifications define ad‑hoc queries (client submits query at runtime) versus stored queries (invoked by name).
- Encodings: XML schema fragments and KVP parameter lists are defined to allow interoperability and easy transformation to backend query languages.
- Predicates supported:
- Logical: and, or, not
- Comparison: =, ≠, <, ≤, >, ≥, like, isNull, between
- Spatial: equal, disjoint, touches, within, overlaps, crosses, intersects, contains, DWithin, Beyond, BBOX
- Temporal: after, before, begins, begunBy, contains, during, ends, equals, meets, metBy, overlaps, overlappedBy
- Identifier test: match resource identifier
- Filter Capabilities: XML encoding for metadata that declares which conformance classes, predicates, operators, operands and functions a service supports.
- Conformance classes: predefined subsets (e.g., Minimum Standard Filter, Standard Filter, Minimum Spatial Filter, Spatial Filter, Minimum Temporal Filter, Temporal Filter, Sorting, Ad hoc Query) to document and test implementations.
Applications and users
ISO 19143 is intended for:
- GIS and geospatial web‑service developers implementing query operations (e.g., GetFeature) and service back‑ends.
- Integrators who must translate portable XML/KVP filter encodings into SQL, XQuery or other target query languages.
- Service providers who need to publish Filter Capabilities and declare supported predicates and operators.
- Standards bodies and implementers (ISO/TC 211, OGC) building interoperable geospatial services.
Practical use cases include query interoperability across heterogeneous stores (relational databases, XML stores, geospatial servers) and enabling ad‑hoc client queries against web‑accessible geospatial resources.
Related standards
- ISO 19142 (Web Feature Service / GetFeature) - uses components defined in ISO 19143.
- Work originated in collaboration with the Open Geospatial Consortium (OGC).
Frequently Asked Questions
ISO 19143:2010 is a standard published by the International Organization for Standardization (ISO). Its full title is "Geographic information - Filter encoding". This standard covers: ISO 19143:2010 describes an XML and KVP encoding of a system neutral syntax for expressing projections, selection and sorting clauses collectively called a query expression. These components are modular and intended to be used together or individually by other International Standards which reference ISO 19143:2010. ISO 19143:2010 defines an abstract component, named AbstractQueryExpression, from which other specifications can subclass concrete query elements to implement query operations. It also defines an additional abstract query component, named AbstractAdhocQueryExpresison, which is derived from AbstractQueryExpression and from which other specifications can subclass concrete query elements which follow the following query pattern: An abstract query element from which service specifications can subclass a concrete query element that implements a query operation that allows a client to specify a list of resource types, an optional projection clause, an optional selection clause, and an optional sorting clause to query a subset of resources that satisfy the selection clause. This pattern is referred to as an ad hoc query pattern since the server in not aware of the query until it is submitted for processing. This is in contrast to a stored query expression, which is stored and can be invoked by name or identifier. ISO 19143:2010 also describes an XML and KVP encoding of a system-neutral representation of a select clause. The XML representation is easily validated, parsed and transformed into a server-specific language required to retrieve or modify object instances stored in some persistent object store. ISO 19143:2010 defines the XML encoding for the following predicates. - A standard set of logical predicates: and, or and not. - A standard set of comparison predicates: equal to, not equal to, less than, less than or equal to, greater than, greater than or equal to, like, is null and between. - A standard set of spatial predicates: equal, disjoint, touches, within, overlaps, crosses, intersects, contains, within a specified distance, beyond a specified distance and BBOX. - A standard set of temporal predicates: after, before, begins, begun by, contains, during, ends, equals, meets, met by, overlaps and overlapped by. - A predicate to test whether the identifier of an object matches the specified value. ISO 19143:2010 defines the XML encoding of metadata that allows a service to declare which conformance classes, predicates, operators, operands and functions it supports. This metadata is referred to as Filter Capabilities.
ISO 19143:2010 describes an XML and KVP encoding of a system neutral syntax for expressing projections, selection and sorting clauses collectively called a query expression. These components are modular and intended to be used together or individually by other International Standards which reference ISO 19143:2010. ISO 19143:2010 defines an abstract component, named AbstractQueryExpression, from which other specifications can subclass concrete query elements to implement query operations. It also defines an additional abstract query component, named AbstractAdhocQueryExpresison, which is derived from AbstractQueryExpression and from which other specifications can subclass concrete query elements which follow the following query pattern: An abstract query element from which service specifications can subclass a concrete query element that implements a query operation that allows a client to specify a list of resource types, an optional projection clause, an optional selection clause, and an optional sorting clause to query a subset of resources that satisfy the selection clause. This pattern is referred to as an ad hoc query pattern since the server in not aware of the query until it is submitted for processing. This is in contrast to a stored query expression, which is stored and can be invoked by name or identifier. ISO 19143:2010 also describes an XML and KVP encoding of a system-neutral representation of a select clause. The XML representation is easily validated, parsed and transformed into a server-specific language required to retrieve or modify object instances stored in some persistent object store. ISO 19143:2010 defines the XML encoding for the following predicates. - A standard set of logical predicates: and, or and not. - A standard set of comparison predicates: equal to, not equal to, less than, less than or equal to, greater than, greater than or equal to, like, is null and between. - A standard set of spatial predicates: equal, disjoint, touches, within, overlaps, crosses, intersects, contains, within a specified distance, beyond a specified distance and BBOX. - A standard set of temporal predicates: after, before, begins, begun by, contains, during, ends, equals, meets, met by, overlaps and overlapped by. - A predicate to test whether the identifier of an object matches the specified value. ISO 19143:2010 defines the XML encoding of metadata that allows a service to declare which conformance classes, predicates, operators, operands and functions it supports. This metadata is referred to as Filter Capabilities.
ISO 19143:2010 is classified under the following ICS (International Classification for Standards) categories: 35.240.70 - IT applications in science. The ICS classification helps identify the subject area and facilitates finding related standards.
You can purchase ISO 19143:2010 directly from iTeh Standards. The document is available in PDF format and is delivered instantly after payment. Add the standard to your cart and complete the secure checkout process. iTeh Standards is an authorized distributor of ISO standards.
Standards Content (Sample)
SLOVENSKI STANDARD
01-december-2010
Geografske informacije - Kodiranje s filtrom
Geographic information - Filter encoding
Information Géographique - Codage de filtres
Ta slovenski standard je istoveten z: ISO 19143:2010
ICS:
07.040 Astronomija. Geodezija. Astronomy. Geodesy.
Geografija Geography
35.240.70 Uporabniške rešitve IT v IT applications in science
znanosti
2003-01.Slovenski inštitut za standardizacijo. Razmnoževanje celote ali delov tega standarda ni dovoljeno.
INTERNATIONAL ISO
STANDARD 19143
First edition
2010-10-15
Geographic information — Filter
encoding
Information géographique — Codage de filtres
Reference number
©
ISO 2010
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but
shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In
downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat
accepts no liability in this area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation
parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In
the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below.
© ISO 2010
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or
ISO's member body in the country of the requester.
ISO copyright office
Case postale 56 • CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Published in Switzerland
ii © ISO 2010 – All rights reserved
Contents Page
Foreword .iv
Introduction.v
1 Scope.1
2 Conformance .2
3 Normative references.3
4 Terms and definitions .3
5 Conventions.6
5.1 Abbreviated terms .6
5.2 UML notation.7
5.3 Use of examples .8
5.4 Namespaces.8
5.5 KVP-encoded parameter lists .8
5.6 XML Schema fragments.9
6 Query expressions .9
6.1 General .9
6.2 Abstract query expressions .9
6.3 Ad hoc query expression.10
7 Filter.13
7.1 General considerations.13
7.2 Encoding .14
7.3 Expressions .14
7.4 Value references.15
7.5 Literals.17
7.6 Functions.18
7.7 Comparison operators.19
7.8 Spatial operators .22
7.9 Temporal operators.26
7.10 Logical operators .28
7.11 Object identifiers .30
7.12 Extensions .31
7.13 Filter capabilities .33
7.14 Encoding .35
8 Sorting .42
8.1 General considerations.42
8.2 Encoding .42
8.3 Exceptions .43
Annex A (normative) Conformance testing.44
Annex B (informative) Filter schema definitions .48
Annex C (informative) Examples .60
Annex D (informative) EBNF for XPath subset .80
Annex E (informative) Abstract model.81
Bibliography.82
Foreword
ISO (the International Organization for Standardization) is a worldwide federation of national standards bodies
(ISO member bodies). The work of preparing International Standards is normally carried out through ISO
technical committees. Each member body interested in a subject for which a technical committee has been
established has the right to be represented on that committee. International organizations, governmental and
non-governmental, in liaison with ISO, also take part in the work. ISO collaborates closely with the
International Electrotechnical Commission (IEC) on all matters of electrotechnical standardization.
International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.
The main task of technical committees is to prepare International Standards. Draft International Standards
adopted by the technical committees are circulated to the member bodies for voting. Publication as an
International Standard requires approval by at least 75 % of the member bodies casting a vote.
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent
rights. ISO shall not be held responsible for identifying any or all such patent rights.
ISO 19143 was prepared by Technical Committee ISO/TC 211, Geographic information/Geomatics, in
collaboration with the Open Geospatial Consortium Inc. (OGC).
iv © ISO 2010 – All rights reserved
Introduction
Filter encoding was originated within the OGC.
A fundamental operation performed on a set of data or resources is that of querying in order to obtain a subset
of the data which contains certain desired information that satisfies some query criteria and which is also,
perhaps, sorted in some specified manner.
The term “projection clause” is used to describe an encoding for specifying which subset of resource
properties are presented in the response to a query.
The term “filter or selection clause” is used to describe an encoding of predicates which are typically used in
query operations to specify how data instances in a source dataset should be filtered to produce a result set.
Each data instance in the source set is evaluated using the filter expression. The overall filter expression
always evaluates to true or false. If the expression evaluates to true, the data instance satisfies the expression
and is marked as being in the result set. If the overall filter expression evaluates to false, the data instance is
not in the result set. Thus, the net effect of evaluating a filter expression is a set of data or resource identifiers
which satisfy the predicates in the expression.
The term “sorting clause” is used to describe an encoding for specifying how the data in a response is ordered
prior to being presented.
Such encodings are considered system neutral because using the numerous XML tools available today, XML
encoded projection, selection and sorting clauses can be easily validated, parsed and then transformed into
whatever target query language is required to retrieve or modify resources stored in some persistent object
store. For example an XML encoded query composed of a projection, selection and sorting clauses can be
transformed into a SQL “SELECT … FROM … WHERE … ORDER BY …” statement to fetch data stored in a
SQL-based relational database. Similarly, the same XML encoded query expression can just as easily be
transformed into an XQuery expression in order to retrieve data from XML document.
The XML and KVP encodings of projection, selection and sorting clauses described in this International
Standard are common components which can be used together or as individually by a number of web
services. Any service that requires the ability to query objects from a web-accessible repository can make use
of the XML and KVP encodings of a query expression described in this International Standard. For example
the GetFeature operation, defined in ISO 19142, uses the elements derived from definitions in this
International Standard to encode query expressions.
INTERNATIONAL STANDARD ISO 19143:2010(E)
Geographic information — Filter encoding
1 Scope
This International Standard describes an XML and KVP encoding of a system neutral syntax for expressing
projections, selection and sorting clauses collectively called a query expression.
These components are modular and intended to be used together or individually by other standards which
reference this International Standard.
EXAMPLE 1 ISO 19142 makes use of some or all of these components.
This International Standard defines an abstract component, named AbstractQueryExpression, from which
other specifications can subclass concrete query elements to implement query operations.
This International Standard also defines an additional abstract query component, named
AbstractAdhocQueryExpresison, which is derived from AbstractQueryExpression and from which other
specifications can subclass concrete query elements which follow the following query pattern:
An abstract query element from which service specifications can subclass a concrete query element that
implements a query operation that allows a client to specify a list of resource types, an optional projection
clause, an optional selection clause, and an optional sorting clause to query a subset of resources that
satisfy the selection clause.
This pattern is referred to as an ad hoc query pattern since the server is not aware of the query until it is
submitted for processing. This is in contrast to a stored query expression, which is stored and can be invoked
by name or identifier.
This International Standard also describes an XML and KVP encoding of a system-neutral representation of a
select clause. The XML representation is easily validated, parsed and transformed into a server-specific
language required to retrieve or modify object instances stored in some persistent object store.
EXAMPLE 2 An XML encoded filter can be transformed into a WHERE clause for a SQL SELECT statement to fetch
data stored in a SQL-based relational database. Similarly, and XML encoded filter expression can be transformed into an
XPath or XPointer expression for fetching data from XML documents.
This International Standard defines the XML encoding for the following predicates.
a) A standard set of logical predicates: and, or and not.
b) A standard set of comparison predicates: equal to, not equal to, less than, less than or equal to, greater
than, greater than or equal to, like, is null and between.
c) A standard set of spatial predicates: equal, disjoint, touches, within, overlaps, crosses, intersects,
contains, within a specified distance, beyond a specified distance and BBOX.
d) A standard set of temporal predicates: after, before, begins, begun by, contains, during, ends, equals,
meets, met by, overlaps and overlapped by.
e) A predicate to test whether the identifier of an object matches the specified value.
This International Standard defines the XML encoding of metadata that allows a service to declare which
conformance classes, predicates, operators, operands and functions it supports. This metadata is referred to
as Filter Capabilities.
2 Conformance
Few usage scenarios require the full implementation of this International Standard to work. Therefore, service
providers may want to specify requirements for only the subset needed to fulfil their service. Or system
developers may want to document which subset of this International Standard it is that that they have
implemented and conform to. These named conformance classes help in specifying such subsets.
This International Standard defines conformance classes based on the operations and behaviour that a filter
encoding service claims to implement. Table 1 indicates which behaviour shall be implemented for each of the
conformance classes. The described behaviour shall be implemented for the corresponding conformance
class, and the name of the paragraph of the actual detailed abstract test suite in Annex A.
Table 1 — FE conformance classes
Subclause of
Conformance class name Operation or behaviour the abstract test
suite
Query A.1
Service that references this International Standard materializes a concrete query
element that is substitutable for fes:AbstractQueryElement.
Ad hoc Query Service that references this International Standard materializes a concrete query A.2
element that is substitutable for fes:AbstractAdhocQueryElement and
materializes a concrete selection clause element that is substitutable for
fes:AbstractSelectionClause and materializes a concrete projection clause
element that is substitutable for fes:AbstractProjectionClause and materializes a
concrete sorting clause element that is substitutable for
fes:AbstractSortingClause.
Functions Implements functions that are in addition to the operators defined in this A.3
International Standard.
Resource Identification Implements the ResourceId operator with the rid parameter to allow predicates to A.4
be written that allow a specific resource to be queried.
Minimum Standard Filter A.5
Implements the comparison operators: PropertyIsEqualTo,
PropertyIsNotEqualTo, PropertyIsLessThan, PropertyIsGreaterThan,
PropertyIsLessThanOrEqualTo, PropertyIsGreaterThanOrEqualTo. Implements
the logical operators. Does not implement any additional functions.
Standard Filter A.6
Implements all the comparison and logical operators and may implement one or
more additional functions.
Minimum Spatial Filter Implements only the BBOX spatial operator. A.7
Spatial Filter Implements the BBOX spatial operator and one or more of the other spatial A.8
operators.
Minimum Temporal Filter Implements only the During temporal operator. A.9
Temporal Filter Implements the During temporal operator and one or more of the other temporal A.10
operators.
Version navigation A.11
Implements ResourceId operator with the parameters that allow versions of
resources to be queried (version, startTime, endTime).
Sorting Implements sorting of the resources in a response. A.12
Extended Operators Implements additional operators not defined in this International Standard. A.13
Minimum XPath Implements the minimum required set of XPath capabilities. A.14
Schema Element Function Implements the schema-element() XPath function. A.15
Other standards that include this International Standard shall declare what constitutes a “minimum” filter by
declaring the minimum set of conformance classes from Table 1 that shall be implemented.
2 © ISO 2010 – All rights reserved
3 Normative references
The following referenced documents are indispensable for the application of this document. For dated
references, only the edition cited applies. For undated references, the latest edition of the referenced
document (including any amendments) applies.
ISO 19108:2002, Geographic information — Temporal schema
ISO 19125-1:2004, Geographic information — Simple feature access — Part 1: Common architecture
ISO 19136:2007, Geographic information — Geography Markup Language (GML)
IETF RFC 2396, Uniform Resource Identifiers (URN): Generic Syntax (August 1998)
OGC 06-121r3, OGC Web Services Common Specification, OGC® Implementation Specification
(9 February 2009)
W3C XML, Extensible Markup Language (XML) 1.0 (Third edition), W3C Recommendation (4 February 2004)
W3C XML, Namespaces, Namespaces in XML, W3C Recommendation (14 January 1999)
W3C XML, Path Language, XML Path Language (XPath) 2.0, W3C Recommendation (23 January 2007)
W3C XML, Schema Part 1, XML Schema Part 1: Structures, W3C Recommendation (2 May 2001)
W3C XML, Schema Part 2, XML Schema Part 2: Datatypes, W3C Recommendation (2 May 2001)
4 Terms and definitions
For the purposes of this document, the following terms and definitions apply.
4.1
attribute
〈XML〉 name-value pair contained in an element
[ISO 19136:2007, definition 4.1.3]
NOTE In this International Standard, an attribute is an XML attribute unless otherwise specified.
4.2
client
software component that can invoke an operation from a server
[ISO 19128:2005, definition 4.1]
4.3
coordinate
one of a sequence of n numbers designating the position of a point in n-dimensional space
[ISO 19111:2007, definition 4.5]
4.4
coordinate reference system
coordinate system that is related to an object by a datum
[ISO 19111:2007, definition 4.8]
4.5
coordinate system
set of mathematical rules for specifying how coordinates are to be assigned to points
[ISO 19111:2007, definition 4.10]
4.6
element
〈XML〉 basic information item of an XML document containing child elements, attributes and character data
[ISO 19136:2007, definition 4.1.23]
4.7
feature
abstraction of real world phenomena
[ISO 19101:2002, definition 4.11]
NOTE A feature can occur as a type or an instance. It is intended that the term “feature type” or “feature instance” be
used when only one is meant.
4.8
feature identifier
identifier that uniquely designates a feature instance
[ISO 19142:2010, definition 4.8]
4.9
feature reference
Uniform Resource Identifier that identifies a feature
4.10
filter capabilities XML
metadata, encoded in XML, that describes which predicates defined in this International Standard a system
implements
4.11
filter expression
predicate expression encoded using XML
4.12
filter expression processor
component of a system that processes a filter expression
4.13
function
rule that associates each element from a domain (source, or domain of the function) to a unique element in
another domain (target, co-domain, or range)
[ISO 19107:2003, definition 4.41]
4.14
interface
named set of operations that characterize the behaviour of an entity
[ISO 19119:2005, definition 4.2]
4 © ISO 2010 – All rights reserved
4.15
literal value
constant, explicitly specified value
NOTE This contrasts with a value that is determined by resolving a chain of substitution (e.g. a variable).
4.16
join predicate
filter expression that includes one or more clauses that constrain properties from two different entity types
NOTE In this International Standard, the entity types are resource types.
4.17
namespace
〈XML〉 collection of names, identified by a URI reference which are used in XML documents as element
names and attribute names
[W3C XML Namespaces]
4.18
operation
specification of a transformation or query that an object may be called to execute
[ISO 19119:2005, definition 4.3]
4.19
predicate
set of computational operations applied to a data instance which evaluate to true or false
4.20
predicate expression
formal syntax for describing a predicate
4.21
property
facet or attribute of an object referenced by a name
4.22
request
invocation of an operation by a client
[ISO 19128:2005, definition 4.10]
4.23
resource
asset or means that fulfils a requirement
[ISO 19115:2003, definition 4.10]
NOTE In this International Standard, a resource is assumed to have identity.
4.24
response
result of an operation returned from a server to a client
[ISO 19128:2005, definition 4.11]
4.25
service
distinct part of the functionality that is provided by an entity through interfaces
[ISO 19119:2005, definition 4.1]
4.26
server
particular instance of a service
[ISO 19128:2005, definition 4.12]
4.27
tuple
ordered list of values
[ISO 19136:2007, definition 4.1.63]
NOTE In this International Standard, the ordered list is generally a finite sequence of resources.
4.28
Uniform Resource Identifier
URI
unique identifier for a resource, structured in conformance with IETF RFC 2396
[ISO 19136:2007, definition 4.1.65]
NOTE The general syntax is ::. The hierarchical syntax with a namespace is
://?.
5 Conventions
5.1 Abbreviated terms
BBOX Bounding Box
CRS Coordinate Reference System
EBNF Extended Backus-Naur Form
EPSG European Petroleum Survey Group
GML Geography Markup Language
HTTP Hypertext Transfer Protocol
HTTPS Secure Hypertext Transfer Protocol
IETF Internet Engineering Task Force
KVP Keyword-value Pair
OGC Open Geospatial Consortium
SRS Spatial Reference System
URI Uniform Resource Identifier
URL Uniform Resource Locator
6 © ISO 2010 – All rights reserved
URN Uniform Resource Name
UTC Coordinated Universal Time
W3C World Wide Web Consortium
WFS Web Feature Service
XML Extensible Markup Language
5.2 UML notation
5.2.1 Figure 1 describes the Unified Modelling Language (UML) notations used in this International
Standard for UML class diagrams.
Association between classes
Association Name
Class #1 Class #2
role-1 role-2
Association Cardinality
Class Class
1.*
Only one One or more
Class Class
0.* n
Zero or more Specific number
Class
0.1
Optional (zero or one)
Aggregation between classes Class Inheritance (subtyping of classes)
Aggregate Class Superclass
Component Class
Subclass #1 Subclass #2 Subclass #n
...............
Figure 1 — UML notation in class diagrams
5.2.2 In these class diagrams, the following stereotypes of UML classes are used:
a) <> is a descriptor of a set of values that lack identity (independent existence and the
possibility of side effects). A DataType is a class with no operations, whose primary purpose is to hold the
information.
b) <> is a data type whose instances form a list of alternative literal values. Enumeration
means a short list of well-understood potential values within a class.
c) <> is a flexible enumeration for expressing a long list of potential alternative values. If the list
alternatives are completely known, an enumeration shall be used; if the only likely alternatives are known,
a code list shall be used.
d) <> is a definition of a set of operations that is supported by objects having this interface. An
Interface class cannot contain any attributes.
e) <> is a stereotyped class used for specification of a domain of instances (objects), together with
the operations applicable to the objects. A Type class may have attributes and associations.
f) <> is a list of alternate attributes where only one of those attributes may be present at any time.
See also ISO/TS 19103:2005, 6.8.2 and D.8.3.
5.2.3 In this International Standard, the following standard data types are used:
a) CharacterString is a sequence of characters;
b) LocalisedCharacterString is a CharacterString associated with a locale;
c) Boolean is a value specifying TRUE or FALSE;
d) URI is an identifier of a resource that provides more information;
e) Integer is an integer number.
5.3 Use of examples
This International Standard makes use of XML examples. They are meant to illustrate the various aspects of
filters discussed in this International Standard. While every effort has been made to ensure that the examples
are well formed and valid, this goal may be sacrificed for the sake of clarity. For instance, many examples are
formatted in a specific way to highlight a particular aspect that would render the example invalid from the
perspective of an XML validation tool. Furthermore, most examples reference fictitious servers and data.
Thus, this International Standard does not assert that any XML encoded example, copied from this
International Standard, would necessarily execute correctly or validate using a particular XML validation tool.
5.4 Namespaces
Namespaces (a specified in W3C XML Namespaces) are used to discriminate XML vocabularies from one
another. The following namespaces are normatively used in this International Standard:
a) (http://www.opengis.net/fes/2.0): for the Filter vocabulary;
b) (http://www.opengis.net/gml/3.2): for the GML vocabulary.
5.5 KVP-encoded parameter lists
This International Standard defines both XML and KVP encodings for query and filter expressions. Several of
the parameters in the KVP-encoding consist of lists of values (see Table 2) and possibly lists of lists of values.
This subclause defines how to encode lists of values as the value of a parameter.
Parameters consisting of lists shall use the comma (“,”) as the delimiter between items in the list. In addition,
multiple lists may be specified as the value of a parameter by enclosing each list in parentheses; “(“, ”)”.
EXAMPLE 1 This example shows a list of items.
PARAMETER=item1,item2,item3,item4a%2Citem4b
This list consists of four values: item1, item2, item3 and the value “item4a,item4b”.
NOTE In this example, the embedded comma in the last item has been encoded as per IETF RFC 2396 in order to
distinguish it from the commas used in the list of delimit list entries.
EXAMPLE 2 This example shows multiple lists of items assigned to a single parameter.
PARAMETER=(item11,item12,item13)(item21,item22,item23)
8 © ISO 2010 – All rights reserved
5.6 XML Schema fragments
This International Standard makes use of XML Schema (as given in W3C XML Schema Part 1 and W3C XML
Schema Part 2) fragments to define the XML encoding of the components of a filter expression. These XML
Schema fragments are collected into a set of consolidated schema files in Annex B.
6 Query expressions
6.1 General
A query expression (see Figure 2) is an action that performs a search over some set of resources and returns
a subset of those resources. Other standards that reference this International Standard shall assert what a
resource is.
EXAMPLE A WFS would assert that a resource is a feature.
QueryExpression
+ handle [0.1] : CharacterString
AdhocQueryExpression
+ types [1.*] : Type {ordered}
+ projection [0.1] : Any
+ selection [0.1] : Any
+ sorting [0.1] : Any
<>
Type
TypeName
+ name : TypeName
+ ofType : ScopedName
+ alias [0.1] : LocalName
+ ofKind : ScopedName
Figure 2 — Query expressions
6.2 Abstract query expressions
This International Standard defines the abstract element fes:AbstractQueryExpression as the head of a
substitution group of query expressions. The element fes:AbstractQueryExpression is defined by the following
XML Schema fragment:
type="fes:AbstractQueryExpressionType" abstract="true"/>
The fes:AbstractQueryExpression element defines the handle attribute which can be used to assign user-
defined identifier to the query expression for the purpose of error handling or correlating the response to a
query, from within a series of queries, with the source query expression.
International Standards that reference this International Standard shall declare the types(s) of resources that
can be queried and shall derive query expressions from fes:AbstractQueryExpression.
6.3 Ad hoc query expression
6.3.1 General considerations
A fundamental type of query expression is the ad hoc query expression. It is ad hoc in the sense that the
query is not known before the time it is being executed as, for example, a stored query would be.
An ad hoc query expression is a query expression that contains the names of one or more resource types to
query, an optional projection clause enumerating the properties of the resource to present in the response, an
option selection clause that constraints the properties of those resources types in order to define a result set
and an optional sorting clause specifying the order in which the result set is presented.
This subclause defines the head of an substitution group called fes:AbstractAdhocQueryExpression from
which standards that reference this International Standard can derive concrete ad hoc query expressions.
6.3.2 XML encoding
The following XML Schema fragment define the abstract element fes:AbstractAdhocQueryExpression
type="fes:AbstractAdhocQueryExpressionType"
substitutionGroup="fes:AbstractQueryExpression"
abstract="true"/>
minOccurs="0" maxOccurs="unbounded"/>
type="fes:TypeNamesListType" use="required"/>
type="fes:AliasesType"/>
6.3.3 KVP-encoding
Table 2 defines the KVP-encoding for an ad hoc query expression.
10 © ISO 2010 – All rights reserved
Table 2 — KVP-encoding for ad hoc query expression
a
URL Component Description
O/M
b
TYPENAMES A comma-separated list of resource types to query. Specifying more that one
M
name indicates that a join is being performed.
ALIASES O A comma-separated list of aliases for the resource types listed as the value of
the TYPENAMES parameter.
Projection clause
PROPERTYNAME O If more that one feature type name is specified as the value of the TYPENAMES
keyword, a list of parameter lists shall be specified (see 5.5.). Each sublist shall
correspond 1:1 with each feature type name listed as the value of the
TYPENAMES parameter.
Selection clause
FILTER O The value of the parameter shall be a filter expression encoded using the
(Mutually exclusive with language specified by the FILTER_LANGUAGE parameter.
RESOURCEID and BBOX)
FILTER_LANGUAGE O Indicates the predicate language used to encode the filter expression that is the
value of the FILTER parameter.
The default value urn:ogc:def:query Language:OGC-FES:Filter shall be used to
indicate that the value of FILTER parameter is a string encoding the filter using
an XML fragment as defined in this International Standard.
RESOURCEID O A comma-separated list of resource identifiers to retrieve from some data store.
(Mutually exclusive with FILTER and
BBOX)
BBOX O A bounding rectangle, encoded as specified in OGC 06-131r3, indicating that all
(Mutually exclusive with FILTER and resources which intersect that BBOX shall be retrieved from some data store.
RESOURCEID)
Sorting clause
SORTBY O The SORTBY parameter is used to specify a list of value references that should
be used to order (upon presentation) the set of resource instances that satisfy
the query. The value of the SORTBY parameter shall have the form
“PropertyName [ASC|DESC][,PropertyName [ASC|DESC],…]” where the letters
ASC are used to indicate an ascending sort and the letters DESC are used to
indicate a descending sort. If neither ASC nor DESC are specified, the default
sort order shall be ascending. An example value might be: “SORTBY=Field1
DESC,Field2 DESC,Field3”. In this case the results are sorted by Field 1
descending, Field2 descending and Field3 ascending.
a
O = Optional, M = Mandatory.
b
Standards that reference this International Standard may change the requirement for the TYPENAME parameter. In such cases,
the referencing standard shall document whether the TYPENAME parameter is mandatory, optional or mandatory in some cases and
optional in others.
6.3.3.1 Parameter discussion
6.3.3.1.1 typeNames parameter
The mandatory typeNames parameter shall be used within an ad hoc query expression to encode the names
of one or more correlated resource types to be queried. Individual resource type names shall be encoded as
QName (as given in W3C XML Schema Part 2).
NOTE For the KVP-encoding of the typeNames parameter, see 5.5 for encoding lists of values.
International Standards that derive query expressions from fes:AbstractQueryExpression shall declare the
resource type(s) that can be queried.
6.3.3.1.2 aliases parameter
The optional aliases parameter may be used within an ad hoc query expression to specify alternate names for
the resource type names specified as the value of the typeNames parameter. A resource type alias may be
used anywhere; the resource type name may be used within the context of the query expression.
The number of list elements in the value of the aliases parameter shall match the number of corresponding
resource type names in the value of the typeNames parameter and shall be correlated 1:1.
EXAMPLE 1 < … typeNames=“ns1:ResourceType1, ns2:ResourceType2” aliases=“A B” …>
This example encodes an ad hoc query expression fragment that queries the resource types ns1:ResourceType1 and
ns2:ResourceType2 which are aliased to A and B. Thus, the tokens A or B can be used within the filter expression of the
query expression as alternate names for the resource types ns1:ResourceType1 and ns2:ResourceType2.
Each alias specified in the value of aliases attribute shall be unique within the context of a single query
expression.
If the aliases attribute is used, an alias shall be specified for each resource type name listed as the value of
typeNames attribute.
Aliases are typically used in query expressions that perform a join operation to support self-joins. That is a join
of one resource type back to itself.
EXAMPLE 2 typeNames=“myns:ResType1 myns:ResType1” aliases=“a b”
In this example, the first resource type, myns:ResType1, is aliased to the name “a” and the second resource type,
myns:Feat1, is aliased to the name “b”. Thus properties from the first instance of myns:ResType1 can be referenced in a
request as “/a/myns:property_name” and properties from the second instance of myns:ResType2 can be referenced in a
request as “/b/myns:property_name” where the token “myns:property_name” is used as a place holder for the name of any
property of the resource type myns:ResType1.
6.3.3.1.3 Projection clause
A projection clause encodes a list of optional resource properties that shall be available in a query response.
For XML-encoded requests, specifications which implement the projection clause of an ad hoc query
expression shall define a concrete element derived from fes:AbstractAdhocProjectionClause.
For KVP-encoded requests, the PROPERTYNAME keyword shall be used to encode the projection clause.
The value of the PROPERTYNAME keyword shall be a comma-separated list of property names.
6.3.3.1.4 Selection clause
The selection clause defines a set of query predicates that shall be applied to a dataset in order to define a
subset of data to be operated upon.
Services that implement this International Standard shall use the fes:Filter element, which is substitutable for
fes:AbstractSelectionClause, to encode the selection clause of a query expression.
For XML-encoded requests, the selection clauses shall be encoded using the fes:Filter element.
For KVP-encoded requests, the select clause shall be encoded using the keywords FILTER,
FILTER_LANGUAGE, RESOURCEID, BBOX (see Table 2). The parameters FILTER, RESOURCEID and
BBOX are mutually exclusive. In the event that a selection clause specifies more than one of these
parameters, an OperationNotSupported (as given in OGC 06-121r3, Table 25) exception shall be raised.
12 © ISO 2010 – All rights reserved
6.3.3.1.5 Join queries
A join query finds tuples (i.e. pairs, triples, etc.) of resources, among a list of resource types, that satisfy a filter
expression which includes join predicates. If the filter expression is satisfied, that tuple of resources is
considered to be in the result set of the query expression.
A join query is encoded by:
a) listing the resource types to join using the typeNames parameter (see 6.3.3.1.1);
b) specifying join predicates in the selection clause that reference properties of the resource types listed as
the values of the typeNames parameter (see 6.3.3.1.1).
Services that implement join queries shall implement an inner join meaning that only resource tuples which
match the join conditions shall be returned in the result set.
6.3.3.1.6 schema-element() function
If the list of values for the typeNames parameters contains a single QName then the schema-element()
function can be used to trigger a sequence of queries on the specified resource type and any resource type
whose object elements are in the substitution group of the specified resource type.
EXAMPLE typeNames=“schema-element(ns1:Vehicles)” might, along with ns1:Vehicle, query the resource types
ns1:Cars, ns1:Boats, etc …
The schema-element() function shall not be used if a join operation (see 6.3.3.1.5) is being performed.
6.3.3.1.7 Sorting clause
A sorting clause can be used to assert the order in which resources shall appear in response to an ad hoc
query expression.
For XML-encoded requests, standards that reference this Internationa
...
INTERNATIONAL ISO
STANDARD 19143
First edition
2010-10-15
Geographic information — Filter
encoding
Information géographique — Codage de filtres
Reference number
©
ISO 2010
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but
shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In
downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat
accepts no liability in this area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation
parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In
the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below.
© ISO 2010
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or
ISO's member body in the country of the requester.
ISO copyright office
Case postale 56 • CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Published in Switzerland
ii © ISO 2010 – All rights reserved
Contents Page
Foreword .iv
Introduction.v
1 Scope.1
2 Conformance .2
3 Normative references.3
4 Terms and definitions .3
5 Conventions.6
5.1 Abbreviated terms .6
5.2 UML notation.7
5.3 Use of examples .8
5.4 Namespaces.8
5.5 KVP-encoded parameter lists .8
5.6 XML Schema fragments.9
6 Query expressions .9
6.1 General .9
6.2 Abstract query expressions .9
6.3 Ad hoc query expression.10
7 Filter.13
7.1 General considerations.13
7.2 Encoding .14
7.3 Expressions .14
7.4 Value references.15
7.5 Literals.17
7.6 Functions.18
7.7 Comparison operators.19
7.8 Spatial operators .22
7.9 Temporal operators.26
7.10 Logical operators .28
7.11 Object identifiers .30
7.12 Extensions .31
7.13 Filter capabilities .33
7.14 Encoding .35
8 Sorting .42
8.1 General considerations.42
8.2 Encoding .42
8.3 Exceptions .43
Annex A (normative) Conformance testing.44
Annex B (informative) Filter schema definitions .48
Annex C (informative) Examples .60
Annex D (informative) EBNF for XPath subset .80
Annex E (informative) Abstract model.81
Bibliography.82
Foreword
ISO (the International Organization for Standardization) is a worldwide federation of national standards bodies
(ISO member bodies). The work of preparing International Standards is normally carried out through ISO
technical committees. Each member body interested in a subject for which a technical committee has been
established has the right to be represented on that committee. International organizations, governmental and
non-governmental, in liaison with ISO, also take part in the work. ISO collaborates closely with the
International Electrotechnical Commission (IEC) on all matters of electrotechnical standardization.
International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.
The main task of technical committees is to prepare International Standards. Draft International Standards
adopted by the technical committees are circulated to the member bodies for voting. Publication as an
International Standard requires approval by at least 75 % of the member bodies casting a vote.
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent
rights. ISO shall not be held responsible for identifying any or all such patent rights.
ISO 19143 was prepared by Technical Committee ISO/TC 211, Geographic information/Geomatics, in
collaboration with the Open Geospatial Consortium Inc. (OGC).
iv © ISO 2010 – All rights reserved
Introduction
Filter encoding was originated within the OGC.
A fundamental operation performed on a set of data or resources is that of querying in order to obtain a subset
of the data which contains certain desired information that satisfies some query criteria and which is also,
perhaps, sorted in some specified manner.
The term “projection clause” is used to describe an encoding for specifying which subset of resource
properties are presented in the response to a query.
The term “filter or selection clause” is used to describe an encoding of predicates which are typically used in
query operations to specify how data instances in a source dataset should be filtered to produce a result set.
Each data instance in the source set is evaluated using the filter expression. The overall filter expression
always evaluates to true or false. If the expression evaluates to true, the data instance satisfies the expression
and is marked as being in the result set. If the overall filter expression evaluates to false, the data instance is
not in the result set. Thus, the net effect of evaluating a filter expression is a set of data or resource identifiers
which satisfy the predicates in the expression.
The term “sorting clause” is used to describe an encoding for specifying how the data in a response is ordered
prior to being presented.
Such encodings are considered system neutral because using the numerous XML tools available today, XML
encoded projection, selection and sorting clauses can be easily validated, parsed and then transformed into
whatever target query language is required to retrieve or modify resources stored in some persistent object
store. For example an XML encoded query composed of a projection, selection and sorting clauses can be
transformed into a SQL “SELECT … FROM … WHERE … ORDER BY …” statement to fetch data stored in a
SQL-based relational database. Similarly, the same XML encoded query expression can just as easily be
transformed into an XQuery expression in order to retrieve data from XML document.
The XML and KVP encodings of projection, selection and sorting clauses described in this International
Standard are common components which can be used together or as individually by a number of web
services. Any service that requires the ability to query objects from a web-accessible repository can make use
of the XML and KVP encodings of a query expression described in this International Standard. For example
the GetFeature operation, defined in ISO 19142, uses the elements derived from definitions in this
International Standard to encode query expressions.
INTERNATIONAL STANDARD ISO 19143:2010(E)
Geographic information — Filter encoding
1 Scope
This International Standard describes an XML and KVP encoding of a system neutral syntax for expressing
projections, selection and sorting clauses collectively called a query expression.
These components are modular and intended to be used together or individually by other standards which
reference this International Standard.
EXAMPLE 1 ISO 19142 makes use of some or all of these components.
This International Standard defines an abstract component, named AbstractQueryExpression, from which
other specifications can subclass concrete query elements to implement query operations.
This International Standard also defines an additional abstract query component, named
AbstractAdhocQueryExpresison, which is derived from AbstractQueryExpression and from which other
specifications can subclass concrete query elements which follow the following query pattern:
An abstract query element from which service specifications can subclass a concrete query element that
implements a query operation that allows a client to specify a list of resource types, an optional projection
clause, an optional selection clause, and an optional sorting clause to query a subset of resources that
satisfy the selection clause.
This pattern is referred to as an ad hoc query pattern since the server is not aware of the query until it is
submitted for processing. This is in contrast to a stored query expression, which is stored and can be invoked
by name or identifier.
This International Standard also describes an XML and KVP encoding of a system-neutral representation of a
select clause. The XML representation is easily validated, parsed and transformed into a server-specific
language required to retrieve or modify object instances stored in some persistent object store.
EXAMPLE 2 An XML encoded filter can be transformed into a WHERE clause for a SQL SELECT statement to fetch
data stored in a SQL-based relational database. Similarly, and XML encoded filter expression can be transformed into an
XPath or XPointer expression for fetching data from XML documents.
This International Standard defines the XML encoding for the following predicates.
a) A standard set of logical predicates: and, or and not.
b) A standard set of comparison predicates: equal to, not equal to, less than, less than or equal to, greater
than, greater than or equal to, like, is null and between.
c) A standard set of spatial predicates: equal, disjoint, touches, within, overlaps, crosses, intersects,
contains, within a specified distance, beyond a specified distance and BBOX.
d) A standard set of temporal predicates: after, before, begins, begun by, contains, during, ends, equals,
meets, met by, overlaps and overlapped by.
e) A predicate to test whether the identifier of an object matches the specified value.
This International Standard defines the XML encoding of metadata that allows a service to declare which
conformance classes, predicates, operators, operands and functions it supports. This metadata is referred to
as Filter Capabilities.
2 Conformance
Few usage scenarios require the full implementation of this International Standard to work. Therefore, service
providers may want to specify requirements for only the subset needed to fulfil their service. Or system
developers may want to document which subset of this International Standard it is that that they have
implemented and conform to. These named conformance classes help in specifying such subsets.
This International Standard defines conformance classes based on the operations and behaviour that a filter
encoding service claims to implement. Table 1 indicates which behaviour shall be implemented for each of the
conformance classes. The described behaviour shall be implemented for the corresponding conformance
class, and the name of the paragraph of the actual detailed abstract test suite in Annex A.
Table 1 — FE conformance classes
Subclause of
Conformance class name Operation or behaviour the abstract test
suite
Query A.1
Service that references this International Standard materializes a concrete query
element that is substitutable for fes:AbstractQueryElement.
Ad hoc Query Service that references this International Standard materializes a concrete query A.2
element that is substitutable for fes:AbstractAdhocQueryElement and
materializes a concrete selection clause element that is substitutable for
fes:AbstractSelectionClause and materializes a concrete projection clause
element that is substitutable for fes:AbstractProjectionClause and materializes a
concrete sorting clause element that is substitutable for
fes:AbstractSortingClause.
Functions Implements functions that are in addition to the operators defined in this A.3
International Standard.
Resource Identification Implements the ResourceId operator with the rid parameter to allow predicates to A.4
be written that allow a specific resource to be queried.
Minimum Standard Filter A.5
Implements the comparison operators: PropertyIsEqualTo,
PropertyIsNotEqualTo, PropertyIsLessThan, PropertyIsGreaterThan,
PropertyIsLessThanOrEqualTo, PropertyIsGreaterThanOrEqualTo. Implements
the logical operators. Does not implement any additional functions.
Standard Filter A.6
Implements all the comparison and logical operators and may implement one or
more additional functions.
Minimum Spatial Filter Implements only the BBOX spatial operator. A.7
Spatial Filter Implements the BBOX spatial operator and one or more of the other spatial A.8
operators.
Minimum Temporal Filter Implements only the During temporal operator. A.9
Temporal Filter Implements the During temporal operator and one or more of the other temporal A.10
operators.
Version navigation A.11
Implements ResourceId operator with the parameters that allow versions of
resources to be queried (version, startTime, endTime).
Sorting Implements sorting of the resources in a response. A.12
Extended Operators Implements additional operators not defined in this International Standard. A.13
Minimum XPath Implements the minimum required set of XPath capabilities. A.14
Schema Element Function Implements the schema-element() XPath function. A.15
Other standards that include this International Standard shall declare what constitutes a “minimum” filter by
declaring the minimum set of conformance classes from Table 1 that shall be implemented.
2 © ISO 2010 – All rights reserved
3 Normative references
The following referenced documents are indispensable for the application of this document. For dated
references, only the edition cited applies. For undated references, the latest edition of the referenced
document (including any amendments) applies.
ISO 19108:2002, Geographic information — Temporal schema
ISO 19125-1:2004, Geographic information — Simple feature access — Part 1: Common architecture
ISO 19136:2007, Geographic information — Geography Markup Language (GML)
IETF RFC 2396, Uniform Resource Identifiers (URN): Generic Syntax (August 1998)
OGC 06-121r3, OGC Web Services Common Specification, OGC® Implementation Specification
(9 February 2009)
W3C XML, Extensible Markup Language (XML) 1.0 (Third edition), W3C Recommendation (4 February 2004)
W3C XML, Namespaces, Namespaces in XML, W3C Recommendation (14 January 1999)
W3C XML, Path Language, XML Path Language (XPath) 2.0, W3C Recommendation (23 January 2007)
W3C XML, Schema Part 1, XML Schema Part 1: Structures, W3C Recommendation (2 May 2001)
W3C XML, Schema Part 2, XML Schema Part 2: Datatypes, W3C Recommendation (2 May 2001)
4 Terms and definitions
For the purposes of this document, the following terms and definitions apply.
4.1
attribute
〈XML〉 name-value pair contained in an element
[ISO 19136:2007, definition 4.1.3]
NOTE In this International Standard, an attribute is an XML attribute unless otherwise specified.
4.2
client
software component that can invoke an operation from a server
[ISO 19128:2005, definition 4.1]
4.3
coordinate
one of a sequence of n numbers designating the position of a point in n-dimensional space
[ISO 19111:2007, definition 4.5]
4.4
coordinate reference system
coordinate system that is related to an object by a datum
[ISO 19111:2007, definition 4.8]
4.5
coordinate system
set of mathematical rules for specifying how coordinates are to be assigned to points
[ISO 19111:2007, definition 4.10]
4.6
element
〈XML〉 basic information item of an XML document containing child elements, attributes and character data
[ISO 19136:2007, definition 4.1.23]
4.7
feature
abstraction of real world phenomena
[ISO 19101:2002, definition 4.11]
NOTE A feature can occur as a type or an instance. It is intended that the term “feature type” or “feature instance” be
used when only one is meant.
4.8
feature identifier
identifier that uniquely designates a feature instance
[ISO 19142:2010, definition 4.8]
4.9
feature reference
Uniform Resource Identifier that identifies a feature
4.10
filter capabilities XML
metadata, encoded in XML, that describes which predicates defined in this International Standard a system
implements
4.11
filter expression
predicate expression encoded using XML
4.12
filter expression processor
component of a system that processes a filter expression
4.13
function
rule that associates each element from a domain (source, or domain of the function) to a unique element in
another domain (target, co-domain, or range)
[ISO 19107:2003, definition 4.41]
4.14
interface
named set of operations that characterize the behaviour of an entity
[ISO 19119:2005, definition 4.2]
4 © ISO 2010 – All rights reserved
4.15
literal value
constant, explicitly specified value
NOTE This contrasts with a value that is determined by resolving a chain of substitution (e.g. a variable).
4.16
join predicate
filter expression that includes one or more clauses that constrain properties from two different entity types
NOTE In this International Standard, the entity types are resource types.
4.17
namespace
〈XML〉 collection of names, identified by a URI reference which are used in XML documents as element
names and attribute names
[W3C XML Namespaces]
4.18
operation
specification of a transformation or query that an object may be called to execute
[ISO 19119:2005, definition 4.3]
4.19
predicate
set of computational operations applied to a data instance which evaluate to true or false
4.20
predicate expression
formal syntax for describing a predicate
4.21
property
facet or attribute of an object referenced by a name
4.22
request
invocation of an operation by a client
[ISO 19128:2005, definition 4.10]
4.23
resource
asset or means that fulfils a requirement
[ISO 19115:2003, definition 4.10]
NOTE In this International Standard, a resource is assumed to have identity.
4.24
response
result of an operation returned from a server to a client
[ISO 19128:2005, definition 4.11]
4.25
service
distinct part of the functionality that is provided by an entity through interfaces
[ISO 19119:2005, definition 4.1]
4.26
server
particular instance of a service
[ISO 19128:2005, definition 4.12]
4.27
tuple
ordered list of values
[ISO 19136:2007, definition 4.1.63]
NOTE In this International Standard, the ordered list is generally a finite sequence of resources.
4.28
Uniform Resource Identifier
URI
unique identifier for a resource, structured in conformance with IETF RFC 2396
[ISO 19136:2007, definition 4.1.65]
NOTE The general syntax is ::. The hierarchical syntax with a namespace is
://?.
5 Conventions
5.1 Abbreviated terms
BBOX Bounding Box
CRS Coordinate Reference System
EBNF Extended Backus-Naur Form
EPSG European Petroleum Survey Group
GML Geography Markup Language
HTTP Hypertext Transfer Protocol
HTTPS Secure Hypertext Transfer Protocol
IETF Internet Engineering Task Force
KVP Keyword-value Pair
OGC Open Geospatial Consortium
SRS Spatial Reference System
URI Uniform Resource Identifier
URL Uniform Resource Locator
6 © ISO 2010 – All rights reserved
URN Uniform Resource Name
UTC Coordinated Universal Time
W3C World Wide Web Consortium
WFS Web Feature Service
XML Extensible Markup Language
5.2 UML notation
5.2.1 Figure 1 describes the Unified Modelling Language (UML) notations used in this International
Standard for UML class diagrams.
Association between classes
Association Name
Class #1 Class #2
role-1 role-2
Association Cardinality
Class Class
1.*
Only one One or more
Class Class
0.* n
Zero or more Specific number
Class
0.1
Optional (zero or one)
Aggregation between classes Class Inheritance (subtyping of classes)
Aggregate Class Superclass
Component Class
Subclass #1 Subclass #2 Subclass #n
...............
Figure 1 — UML notation in class diagrams
5.2.2 In these class diagrams, the following stereotypes of UML classes are used:
a) <> is a descriptor of a set of values that lack identity (independent existence and the
possibility of side effects). A DataType is a class with no operations, whose primary purpose is to hold the
information.
b) <> is a data type whose instances form a list of alternative literal values. Enumeration
means a short list of well-understood potential values within a class.
c) <> is a flexible enumeration for expressing a long list of potential alternative values. If the list
alternatives are completely known, an enumeration shall be used; if the only likely alternatives are known,
a code list shall be used.
d) <> is a definition of a set of operations that is supported by objects having this interface. An
Interface class cannot contain any attributes.
e) <> is a stereotyped class used for specification of a domain of instances (objects), together with
the operations applicable to the objects. A Type class may have attributes and associations.
f) <> is a list of alternate attributes where only one of those attributes may be present at any time.
See also ISO/TS 19103:2005, 6.8.2 and D.8.3.
5.2.3 In this International Standard, the following standard data types are used:
a) CharacterString is a sequence of characters;
b) LocalisedCharacterString is a CharacterString associated with a locale;
c) Boolean is a value specifying TRUE or FALSE;
d) URI is an identifier of a resource that provides more information;
e) Integer is an integer number.
5.3 Use of examples
This International Standard makes use of XML examples. They are meant to illustrate the various aspects of
filters discussed in this International Standard. While every effort has been made to ensure that the examples
are well formed and valid, this goal may be sacrificed for the sake of clarity. For instance, many examples are
formatted in a specific way to highlight a particular aspect that would render the example invalid from the
perspective of an XML validation tool. Furthermore, most examples reference fictitious servers and data.
Thus, this International Standard does not assert that any XML encoded example, copied from this
International Standard, would necessarily execute correctly or validate using a particular XML validation tool.
5.4 Namespaces
Namespaces (a specified in W3C XML Namespaces) are used to discriminate XML vocabularies from one
another. The following namespaces are normatively used in this International Standard:
a) (http://www.opengis.net/fes/2.0): for the Filter vocabulary;
b) (http://www.opengis.net/gml/3.2): for the GML vocabulary.
5.5 KVP-encoded parameter lists
This International Standard defines both XML and KVP encodings for query and filter expressions. Several of
the parameters in the KVP-encoding consist of lists of values (see Table 2) and possibly lists of lists of values.
This subclause defines how to encode lists of values as the value of a parameter.
Parameters consisting of lists shall use the comma (“,”) as the delimiter between items in the list. In addition,
multiple lists may be specified as the value of a parameter by enclosing each list in parentheses; “(“, ”)”.
EXAMPLE 1 This example shows a list of items.
PARAMETER=item1,item2,item3,item4a%2Citem4b
This list consists of four values: item1, item2, item3 and the value “item4a,item4b”.
NOTE In this example, the embedded comma in the last item has been encoded as per IETF RFC 2396 in order to
distinguish it from the commas used in the list of delimit list entries.
EXAMPLE 2 This example shows multiple lists of items assigned to a single parameter.
PARAMETER=(item11,item12,item13)(item21,item22,item23)
8 © ISO 2010 – All rights reserved
5.6 XML Schema fragments
This International Standard makes use of XML Schema (as given in W3C XML Schema Part 1 and W3C XML
Schema Part 2) fragments to define the XML encoding of the components of a filter expression. These XML
Schema fragments are collected into a set of consolidated schema files in Annex B.
6 Query expressions
6.1 General
A query expression (see Figure 2) is an action that performs a search over some set of resources and returns
a subset of those resources. Other standards that reference this International Standard shall assert what a
resource is.
EXAMPLE A WFS would assert that a resource is a feature.
QueryExpression
+ handle [0.1] : CharacterString
AdhocQueryExpression
+ types [1.*] : Type {ordered}
+ projection [0.1] : Any
+ selection [0.1] : Any
+ sorting [0.1] : Any
<>
Type
TypeName
+ name : TypeName
+ ofType : ScopedName
+ alias [0.1] : LocalName
+ ofKind : ScopedName
Figure 2 — Query expressions
6.2 Abstract query expressions
This International Standard defines the abstract element fes:AbstractQueryExpression as the head of a
substitution group of query expressions. The element fes:AbstractQueryExpression is defined by the following
XML Schema fragment:
type="fes:AbstractQueryExpressionType" abstract="true"/>
The fes:AbstractQueryExpression element defines the handle attribute which can be used to assign user-
defined identifier to the query expression for the purpose of error handling or correlating the response to a
query, from within a series of queries, with the source query expression.
International Standards that reference this International Standard shall declare the types(s) of resources that
can be queried and shall derive query expressions from fes:AbstractQueryExpression.
6.3 Ad hoc query expression
6.3.1 General considerations
A fundamental type of query expression is the ad hoc query expression. It is ad hoc in the sense that the
query is not known before the time it is being executed as, for example, a stored query would be.
An ad hoc query expression is a query expression that contains the names of one or more resource types to
query, an optional projection clause enumerating the properties of the resource to present in the response, an
option selection clause that constraints the properties of those resources types in order to define a result set
and an optional sorting clause specifying the order in which the result set is presented.
This subclause defines the head of an substitution group called fes:AbstractAdhocQueryExpression from
which standards that reference this International Standard can derive concrete ad hoc query expressions.
6.3.2 XML encoding
The following XML Schema fragment define the abstract element fes:AbstractAdhocQueryExpression
type="fes:AbstractAdhocQueryExpressionType"
substitutionGroup="fes:AbstractQueryExpression"
abstract="true"/>
minOccurs="0" maxOccurs="unbounded"/>
type="fes:TypeNamesListType" use="required"/>
type="fes:AliasesType"/>
6.3.3 KVP-encoding
Table 2 defines the KVP-encoding for an ad hoc query expression.
10 © ISO 2010 – All rights reserved
Table 2 — KVP-encoding for ad hoc query expression
a
URL Component Description
O/M
b
TYPENAMES A comma-separated list of resource types to query. Specifying more that one
M
name indicates that a join is being performed.
ALIASES O A comma-separated list of aliases for the resource types listed as the value of
the TYPENAMES parameter.
Projection clause
PROPERTYNAME O If more that one feature type name is specified as the value of the TYPENAMES
keyword, a list of parameter lists shall be specified (see 5.5.). Each sublist shall
correspond 1:1 with each feature type name listed as the value of the
TYPENAMES parameter.
Selection clause
FILTER O The value of the parameter shall be a filter expression encoded using the
(Mutually exclusive with language specified by the FILTER_LANGUAGE parameter.
RESOURCEID and BBOX)
FILTER_LANGUAGE O Indicates the predicate language used to encode the filter expression that is the
value of the FILTER parameter.
The default value urn:ogc:def:query Language:OGC-FES:Filter shall be used to
indicate that the value of FILTER parameter is a string encoding the filter using
an XML fragment as defined in this International Standard.
RESOURCEID O A comma-separated list of resource identifiers to retrieve from some data store.
(Mutually exclusive with FILTER and
BBOX)
BBOX O A bounding rectangle, encoded as specified in OGC 06-131r3, indicating that all
(Mutually exclusive with FILTER and resources which intersect that BBOX shall be retrieved from some data store.
RESOURCEID)
Sorting clause
SORTBY O The SORTBY parameter is used to specify a list of value references that should
be used to order (upon presentation) the set of resource instances that satisfy
the query. The value of the SORTBY parameter shall have the form
“PropertyName [ASC|DESC][,PropertyName [ASC|DESC],…]” where the letters
ASC are used to indicate an ascending sort and the letters DESC are used to
indicate a descending sort. If neither ASC nor DESC are specified, the default
sort order shall be ascending. An example value might be: “SORTBY=Field1
DESC,Field2 DESC,Field3”. In this case the results are sorted by Field 1
descending, Field2 descending and Field3 ascending.
a
O = Optional, M = Mandatory.
b
Standards that reference this International Standard may change the requirement for the TYPENAME parameter. In such cases,
the referencing standard shall document whether the TYPENAME parameter is mandatory, optional or mandatory in some cases and
optional in others.
6.3.3.1 Parameter discussion
6.3.3.1.1 typeNames parameter
The mandatory typeNames parameter shall be used within an ad hoc query expression to encode the names
of one or more correlated resource types to be queried. Individual resource type names shall be encoded as
QName (as given in W3C XML Schema Part 2).
NOTE For the KVP-encoding of the typeNames parameter, see 5.5 for encoding lists of values.
International Standards that derive query expressions from fes:AbstractQueryExpression shall declare the
resource type(s) that can be queried.
6.3.3.1.2 aliases parameter
The optional aliases parameter may be used within an ad hoc query expression to specify alternate names for
the resource type names specified as the value of the typeNames parameter. A resource type alias may be
used anywhere; the resource type name may be used within the context of the query expression.
The number of list elements in the value of the aliases parameter shall match the number of corresponding
resource type names in the value of the typeNames parameter and shall be correlated 1:1.
EXAMPLE 1 < … typeNames=“ns1:ResourceType1, ns2:ResourceType2” aliases=“A B” …>
This example encodes an ad hoc query expression fragment that queries the resource types ns1:ResourceType1 and
ns2:ResourceType2 which are aliased to A and B. Thus, the tokens A or B can be used within the filter expression of the
query expression as alternate names for the resource types ns1:ResourceType1 and ns2:ResourceType2.
Each alias specified in the value of aliases attribute shall be unique within the context of a single query
expression.
If the aliases attribute is used, an alias shall be specified for each resource type name listed as the value of
typeNames attribute.
Aliases are typically used in query expressions that perform a join operation to support self-joins. That is a join
of one resource type back to itself.
EXAMPLE 2 typeNames=“myns:ResType1 myns:ResType1” aliases=“a b”
In this example, the first resource type, myns:ResType1, is aliased to the name “a” and the second resource type,
myns:Feat1, is aliased to the name “b”. Thus properties from the first instance of myns:ResType1 can be referenced in a
request as “/a/myns:property_name” and properties from the second instance of myns:ResType2 can be referenced in a
request as “/b/myns:property_name” where the token “myns:property_name” is used as a place holder for the name of any
property of the resource type myns:ResType1.
6.3.3.1.3 Projection clause
A projection clause encodes a list of optional resource properties that shall be available in a query response.
For XML-encoded requests, specifications which implement the projection clause of an ad hoc query
expression shall define a concrete element derived from fes:AbstractAdhocProjectionClause.
For KVP-encoded requests, the PROPERTYNAME keyword shall be used to encode the projection clause.
The value of the PROPERTYNAME keyword shall be a comma-separated list of property names.
6.3.3.1.4 Selection clause
The selection clause defines a set of query predicates that shall be applied to a dataset in order to define a
subset of data to be operated upon.
Services that implement this International Standard shall use the fes:Filter element, which is substitutable for
fes:AbstractSelectionClause, to encode the selection clause of a query expression.
For XML-encoded requests, the selection clauses shall be encoded using the fes:Filter element.
For KVP-encoded requests, the select clause shall be encoded using the keywords FILTER,
FILTER_LANGUAGE, RESOURCEID, BBOX (see Table 2). The parameters FILTER, RESOURCEID and
BBOX are mutually exclusive. In the event that a selection clause specifies more than one of these
parameters, an OperationNotSupported (as given in OGC 06-121r3, Table 25) exception shall be raised.
12 © ISO 2010 – All rights reserved
6.3.3.1.5 Join queries
A join query finds tuples (i.e. pairs, triples, etc.) of resources, among a list of resource types, that satisfy a filter
expression which includes join predicates. If the filter expression is satisfied, that tuple of resources is
considered to be in the result set of the query expression.
A join query is encoded by:
a) listing the resource types to join using the typeNames parameter (see 6.3.3.1.1);
b) specifying join predicates in the selection clause that reference properties of the resource types listed as
the values of the typeNames parameter (see 6.3.3.1.1).
Services that implement join queries shall implement an inner join meaning that only resource tuples which
match the join conditions shall be returned in the result set.
6.3.3.1.6 schema-element() function
If the list of values for the typeNames parameters contains a single QName then the schema-element()
function can be used to trigger a sequence of queries on the specified resource type and any resource type
whose object elements are in the substitution group of the specified resource type.
EXAMPLE typeNames=“schema-element(ns1:Vehicles)” might, along with ns1:Vehicle, query the resource types
ns1:Cars, ns1:Boats, etc …
The schema-element() function shall not be used if a join operation (see 6.3.3.1.5) is being performed.
6.3.3.1.7 Sorting clause
A sorting clause can be used to assert the order in which resources shall appear in response to an ad hoc
query expression.
For XML-encoded requests, standards that reference this International Standard shall use the fes:SortBy
element (see Clause 9), which is substitutable for fes:AbstractSortingClause, to encode the sorting clause of
an ad hoc query expression.
For KVP-encoded requests, the keyword SORTBY shall be used to encode a sorting clause (see Table 2).
7 Filter
7.1 General considerations
A filter (see Figure 3) is used to identify a subset of resources from a collection of resources whose property
values satisfy a set of logically connected predicates. If the property values of a resource satisfy all the
predicates in a filter then that resource is considered to be part of the resulting subset.
This clause defines the XML encoding of a filter as a set of predicate expressions, contained within the root
element fes:Filter, encoded using the elements defined herein.
Filter
+ filter : Operator
Operator
NonIdOperator IdOperator
SpatialOperator TemporalOperator ComparisonOperator LogicalOperator ExtensionOperator
Figure 3 — Filter
7.2 Encoding
The root element of a filter expre
...
NORME ISO
INTERNATIONALE 19143
Première édition
2010-10-15
Information géographique — Codage de
filtres
Geographic information — Filter encoding
Numéro de référence
©
ISO 2010
PDF – Exonération de responsabilité
Le présent fichier PDF peut contenir des polices de caractères intégrées. Conformément aux conditions de licence d'Adobe, ce fichier
peut être imprimé ou visualisé, mais ne doit pas être modifié à moins que l'ordinateur employé à cet effet ne bénéficie d'une licence
autorisant l'utilisation de ces polices et que celles-ci y soient installées. Lors du téléchargement de ce fichier, les parties concernées
acceptent de fait la responsabilité de ne pas enfreindre les conditions de licence d'Adobe. Le Secrétariat central de l'ISO décline toute
responsabilité en la matière.
Adobe est une marque déposée d'Adobe Systems Incorporated.
Les détails relatifs aux produits logiciels utilisés pour la création du présent fichier PDF sont disponibles dans la rubrique General Info
du fichier; les paramètres de création PDF ont été optimisés pour l'impression. Toutes les mesures ont été prises pour garantir
l'exploitation de ce fichier par les comités membres de l'ISO. Dans le cas peu probable où surviendrait un problème d'utilisation,
veuillez en informer le Secrétariat central à l'adresse donnée ci-dessous.
DOCUMENT PROTÉGÉ PAR COPYRIGHT
© ISO 2010
Droits de reproduction réservés. Sauf prescription différente, aucune partie de cette publication ne peut être reproduite ni utilisée sous
quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie et les microfilms, sans l'accord écrit
de l'ISO à l'adresse ci-après ou du comité membre de l'ISO dans le pays du demandeur.
ISO copyright office
Case postale 56 • CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Version française parue en 2011
Publié en Suisse
ii © ISO 2010 – Tous droits réservés
Sommaire Page
Avant-propos .iv
Introduction.v
1 Domaine d'application .1
2 Conformité .2
3 Références normatives.3
4 Termes et définitions .4
5 Conventions.7
5.1 Abréviations.7
5.2 Notation UML .8
5.3 Utilisation d'exemples.9
5.4 Espaces de nommage.9
5.5 Listes de paramètres encodés en KVP .9
5.6 Fragments de schéma XML.10
6 Expressions d'interrogation.10
6.1 Introduction.10
6.2 Expressions d'interrogation abstraites.10
6.3 Expression d'interrogation ad hoc .11
7 Filtre.14
7.1 Introduction.14
7.2 Encodage .15
7.3 Expressions .15
7.4 Références de valeurs .16
7.5 Valeurs littérales.19
7.6 Fonctions .19
7.7 Opérateurs de comparaison.20
7.8 Opérateurs spatiaux.24
7.9 Opérateurs temporels .27
7.10 Opérateurs logiques.30
7.11 Identifiants d'objets.31
7.12 Extensions .33
7.13 Capacités de filtre.34
7.14 Encodage .37
8 Tri .44
8.1 Introduction.44
8.2 Encodage .44
8.3 Exceptions .45
Annexe A (normative) Tests de conformité .46
Annexe B (informative) Définitions de schéma de filtre .50
Annexe C (informative) Exemples .62
Annexe D (informative) EBNF pour sous-ensemble XPath .82
Annexe E (informative) Modèle abstrait.83
Bibliographie.84
Avant-propos
L'ISO (Organisation internationale de normalisation) est une fédération mondiale d'organismes nationaux de
normalisation (comités membres de l'ISO). L'élaboration des Normes internationales est en général confiée
aux comités techniques de l'ISO. Chaque comité membre intéressé par une étude a le droit de faire partie du
comité technique créé à cet effet. Les organisations internationales, gouvernementales et non
gouvernementales, en liaison avec l'ISO participent également aux travaux. L'ISO collabore étroitement avec
la Commission électrotechnique internationale (CEI) en ce qui concerne la normalisation électrotechnique.
Les Normes internationales sont rédigées conformément aux règles données dans les Directives ISO/CEI,
Partie 2.
La tâche principale des comités techniques est d'élaborer les Normes internationales. Les projets de Normes
internationales adoptés par les comités techniques sont soumis aux comités membres pour vote. Leur
publication comme Normes internationales requiert l'approbation de 75 % au moins des comités membres
votants.
L'attention est appelée sur le fait que certains des éléments du présent document peuvent faire l'objet de
droits de propriété intellectuelle ou de droits analogues. L'ISO ne saurait être tenue pour responsable de ne
pas avoir identifié de tels droits de propriété et averti de leur existence.
L'ISO 19143 a été élaborée par le comité technique ISO/TC 211, Information géographique/Géomatique, en
collaboration avec le Open Geospatial Consortium Inc. (OGC).
iv © ISO 2010 – Tous droits réservés
Introduction
Le codage de filtres trouve ses origines au sein du Open Geospatial Consortium Inc. (OGC).
Une opération fondamentale, exécutée sur un ensemble de données ou de ressources, concerne
l'interrogation de manière à obtenir un sous-ensemble de données qui contiennent certaines informations
souhaitées qui satisfont à certains critères d'interrogation et qui sont également triées éventuellement d'une
certaine manière spécifiée.
L'expression clause de projection est utilisée pour décrire un encodage destiné à spécifier quels sous-
ensembles de propriétés de ressources sont présentés dans la réponse à une interrogation.
L'expression filtre ou clause de sélection est utilisée pour décrire un encodage de prédicats qui sont
généralement utilisés dans des opérations d'interrogation pour spécifier la manière dont il convient que les
instances de données dans un ensemble de données sources soient filtrées pour produire un ensemble
résultat. Chaque instance de données dans l'ensemble source est évaluée en utilisant l'expression de filtre.
L'expression de filtre global évaluera toujours le caractère vrai ou faux de l'instance. Si l'expression évalue
que l'instance est vraie, alors l'instance de données satisfait à l'expression et est marquée comme se trouvant
dans l'ensemble résultat. Si l'expression de filtre global évalue que l'instance est fausse, l'instance de
données ne se trouve pas dans l'ensemble résultat. Donc, l'effet de l'évaluation d'une expression de filtre est
un ensemble de données ou d'identifiants de ressources qui satisfont aux prédicats dans l'expression.
L'expression clause de tri est utilisée pour décrire l'encodage destiné à spécifier la manière dont les données
dans une réponse sont ordonnées afin d'être présentées.
De tels encodages sont considérés comme neutres pour un système grâce à l'utilisation de nombreux outils
XML disponibles aujourd'hui, des clauses de projection, de sélection et de tri encodées en XML peuvent être
facilement validées, analysées et ensuite transformées en tout langage d'interrogation cible qui est requis
pour récupérer ou modifier les ressources mémorisées dans certains stockages d'objets permanents. Par
exemple, une interrogation encodée en XML composée de clauses de projection, de sélection et de tri
pourrait être transformée en une instruction SQL «SELECT … FROM … WHERE … ORDER BY …»
(SELECTION … DEPUIS … OÙ … ORDONNÉ PAR …) pour extraire des données mémorisées dans une
base de données relationnelle utilisant SQL. D'une manière similaire, la même expression d'interrogation
encodée en XML pourrait tout aussi facilement être transformée en une expression XQuery (Xinterrogation)
de manière à récupérer des données d'un document XML.
Les encodages en XML et en KVP de clauses de projection, sélection et tri décrites dans la présente Norme
internationale sont des composants communs qui peuvent être utilisés ensemble ou individuellement par un
certain nombre de services web. Tout service qui exige la capacité d'interroger les objets à partir d'un entrepôt
de données accessible par le web peut faire usage des encodages en XML et KVP d'une expression
d'interrogation décrite dans la présente Norme internationale. Par exemple, l'opération GetFeature, définie
dans l'ISO 19142, utilise les éléments dérivés des définitions de la présente Norme internationale pour
encoder des expressions d'interrogation.
NORME INTERNATIONALE ISO 19143:2010(F)
Information géographique — Codage de filtres
1 Domaine d'application
La présente Norme internationale décrit un encodage en XML et KVP d'une syntaxe neutre de système
destiné à exprimer des clauses de projection, de sélection et de tri collectivement appelées expression
d'interrogation.
Ces composants sont modulaires et destinés à être utilisés ensemble ou individuellement par d'autres normes
que celles qui référencent la présente Norme internationale.
EXEMPLE 1 L'ISO 19142 fait usage de certains de ces composants ou de leur totalité.
La présente Norme internationale définit un composant abstrait, nommé AbstractQueryExpression, à partir
duquel d'autres spécifications peuvent sous-classer des éléments d'interrogation concrets pour mettre en
œuvre des opérations d'interrogation.
La présente Norme internationale définit également un composant d'interrogation abstrait supplémentaire,
nommé AbstractAdhocQueryExpression, qui est dérivé du composant AbstractQueryExpression et à partir
duquel d'autres spécifications peuvent sous-classer des éléments d'interrogation concrets qui suivent le
modèle d'interrogation suivant:
Un élément d'interrogation abstrait à partir duquel des spécifications de service peuvent sous-classer un
élément d'interrogation concret mettant en œuvre une opération d'interrogation permettant à un client de
spécifier une liste de types de ressources, une clause de projection optionnelle, une clause de sélection
optionnelle et une clause de tri optionnelle afin d'interroger un sous-ensemble de ressources qui satisfont
à la clause de sélection.
Ce modèle est désigné comme étant un modèle d'interrogation ad hoc du fait que le serveur n'est pas informé
de l'interrogation jusqu'à ce qu'elle lui soit soumise pour traitement. Cela s'oppose à une expression
d'interrogation mémorisée, qui est mémorisée et peut être appelée par un nom ou un identifiant.
La présente Norme internationale décrit également un encodage en XML et en KVP d'une représentation
neutre de système d'une clause de sélection. La représentation XML est facilement validée, analysée et
transformée en un langage spécifique au serveur requis pour récupérer ou modifier des instances d'objets
mémorisées dans certains stockages d'objets permanents.
EXEMPLE 2 Un filtre encodé en XML pourrait être transformé en une clause WHERE (OÙ) pour une instruction SQL
SELECT afin d'extraire des données mémorisées dans une base de données relationnelle utilisant SQL. D'une manière
similaire, une expression de filtre encodée en XML pourrait être transformée en une expression XPath ou XPointer pour
extraire des données de documents XML.
La présente Norme internationale définit l'encodage en XML pour les prédicats suivants:
a) un ensemble standard de prédicats logiques: and, or and not (et, ou et non);
b) un ensemble standard de prédicats de comparaison: equal to, not equal to, less than, less than or equal
to, greater than, greater than or equal to, like, is null and between (égal à, pas égal à, inférieur à, inférieur
ou égal à, supérieur à, supérieur ou égal à, comme, est nul et entre);
c) un ensemble standard de prédicats spatiaux: equal, disjoint, touches, within, overlaps, crosses, intersects,
contains, within a specified distance, beyond a specified distance and BBOX (égal, disjoint, touche, dans,
chevauche, croise, intersecte, contient, à une distance spécifiée, au-delà d'une distance spécifiée et boîte
englobante);
d) un ensemble standard de prédicats temporels: after, before, begins, begun by, contains, during, ends,
equals, meets, met by, overlaps and overlapped by (après, avant, commence, commencé par, contient,
pendant, se termine, égal à, satisfait, satisfait par, chevauche et chevauché par);
e) un prédicat pour vérifier si l'identifiant d'un objet correspond à la valeur spécifiée.
La présente Norme internationale définit l'encodage en XML des métadonnées qui permettent à un service de
déclarer les classes de conformité, les prédicats, les opérateurs, les opérandes et les fonctions qu'il prend en
charge. Ces métadonnées sont désignées par le terme Capacités de filtre.
2 Conformité
Peu de scénarios d'utilisation nécessitent la mise en œuvre complète de la présente Norme internationale
pour fonctionner. Ainsi des fournisseurs de services peuvent vouloir spécifier des exigences pour seulement
le sous-ensemble nécessaire afin de remplir leur service. Ou bien des développeurs de système peuvent
souhaiter appuyer par des documents quel sous-ensemble de la Norme internationale ils doivent mettre en
œuvre et s'y conformer. Ces classes de conformité désignées contribuent à spécifier de tels sous-ensembles.
La présente Norme internationale définit des classes de conformité basées sur les opérations et le
comportement qu'un service d'encodage de filtre revendique mettre en œuvre. Le tableau indique quel
comportement doit être mis en œuvre pour chacune des classes de conformité. Le comportement décrit doit
être mis en œuvre pour la classe de conformité correspondante et le nom du paragraphe de la suite de tests
abstraits détaillés réels à l'Annexe A.
2 © ISO 2010 – Tous droits réservés
Tableau 1 — Classes de conformité FE
Paragraphe
Nom de la classe
Opération ou comportement de la suite de
de conformité
tests abstraits
Query (Interrogation) Service que référence la présente Norme internationale, matérialise un élément A.1
d'interrogation concret qui peut remplacer fes:AbstractQueryElement.
Ad hoc Query Service que référence la présente Norme internationale, matérialise un élément A.2
(Interrogation Ad hoc) d'interrogation concret qui peut remplacer fes:AbstractAdhocQueryElement et
matérialise un élément concret de clause de sélection qui peut remplacer
fes:AbstractSelectionClause et matérialise un élément concret de clause de
projection qui peut remplacer fes:AbstractProjectionClause et matérialise un
élément concret de clause de tri qui peut remplacer fes:AbstractSortingClause.
Functions (Fonctions) Met en œuvre des fonctions qui sont, en plus des opérateurs, définies dans la A.3
présente Norme internationale.
Resource Identification Met en œuvre l'opérateur Resourceld avec le paramètre rid pour permettre aux A.4
(Identification de ressource) prédicats d'être écrits, ce qui permet à une ressource spécifique d'être interrogée.
Minimum Standard Filter Met en œuvre les opérateurs de comparaison: PropertyIsEqualTo, A.5
(Filtre Standard Minimal) PropertyIsNotEqualTo, PropertyIsLessThan, PropertyIsGreaterThan,
PropertyIsLessThanOrEqualTo, PropertyIsGreaterThanOrEqualTo. Met en
œuvre les opérateurs logiques. Ne met pas en œuvre de fonctions
supplémentaires.
Standard Filter (Filtre Standard) Met en œuvre tous les opérateurs de comparaison et logiques et peut mettre en A.6
œuvre une ou plusieurs fonctions supplémentaires.
Minimum Spatial Filter Met en œuvre seulement l'opérateur spatial BBOX. A.7
(Filtre Spatial minimal)
Spatial Filter (Filtre Spatial) Met en œuvre l'opérateur spatial BBOX et un ou plusieurs des autres opérateurs A.8
spatiaux.
Minimum Temporal Filter Met en œuvre seulement l'opérateur temporel During (pendant). A.9
(Filtre temporel minimal)
Temporal Filter (Filtre temporel) Met en œuvre l'opérateur temporel During (pendant) et un ou plusieurs des A.10
autres opérateurs temporels.
Version navigation Met en œuvre l'opérateur Resourceld avec les paramètres qui permettent aux A.11
(Navigation entre versions) versions des ressources de faire l'objet d'une interrogation (version, startTime,
endTime).
Sorting (Tri) Met en œuvre le tri des ressources dans une réponse. A.12
Extended Operators (Opérateurs Met en œuvre des opérateurs supplémentaires non définis dans la présente A.13
étendus) Norme internationale.
Minimum XPath Met en œuvre l'ensemble requis minimal de capacités XPath. A.14
(XPath minimal)
Schema Element Function Met en œuvre la fonction XPath schema-element (). A.15
(Fonction d'élément de schéma)
D'autres normes qui comprennent la présente Norme internationale doivent déclarer ce que constitue un filtre
«minimal» en déclarant l'ensemble minimal de classes de conformité extraites du Tableau 1 qui doivent être
mises en œuvre.
3 Références normatives
Les documents de référence suivants sont indispensables pour l'application du présent document. Pour les
références datées, seule l'édition citée s'applique. Pour les références non datées, la dernière édition du
document de référence s'applique (y compris les éventuels amendements).
ISO 19108:2002, Information géographique — Schéma temporel
ISO 19125-1:2004, Information géographique — Accès aux entités simples — Partie 1: Architecture commune
ISO 19136:2007, Information géographique — Langage de balisage en géographie (GML)
IETF RFC 2396, Uniform Resource Identifiers (URN): Generic Syntax (August 1998)
OGC 06-121r3, OGC Web Services Common Specification, OGC® Implementation Specification
(9 February 2009)
W3C XML, Extensible Markup Language (XML) 1.0 (Third Edition), W3C Recommendation (4 February 2004)
W3C XML, Namespaces, Namespaces in XML, W3C Recommendation (14 January 1999)
W3C XML, Path Language, XML Path Language (XPath) 2.0, W3C Recommendation (23 January 2007)
W3C XML, Schema Part 1, XML Schema Part 1: Structures, W3C Recommendation (2 May 2001)
W3C XML, Schema Part 2, XML Schema Part 2: Datatypes, W3C Recommendation (2 May 2001)
4 Termes et définitions
Pour les besoins du présent document, les termes et définitions suivants s'appliquent.
4.1
attribut
〈XML〉 paire nom-valeur que contient un élément
[ISO 19136:2007, définition 4.1.3]
NOTE Dans la présente Norme internationale, un attribut est un attribut XML sauf mention contraire.
4.2
client
composant logiciel pouvant appeler une opération à partir d'un serveur
[ISO 19128:2005, définition 4.1]
4.3
coordonnée
une des séquences de n nombres désignant la position d'un point dans un espace à n dimensions
[ISO 19111:2007, définition 4.5]
4.4
système de coordonnées de référence
système de coordonnées associé à un objet par une référence
[ISO 19111:2007, définition 4.8]
4.5
système de coordonnées
ensemble de règles mathématiques destinées à spécifier la manière dont les coordonnées doivent être
attribuées à des points
[ISO 19111:2007, définition 4.10]
4.6
élément
〈XML〉 élément d'information de base d'un document XML contenant des éléments enfants, un attribut et des
données de caractères
[ISO 19136:2007, définition 4.1.23]
4 © ISO 2010 – Tous droits réservés
4.7
entité
abstraction de phénomènes du monde réel
[ISO 19101:2002, définition 4.11]
NOTE Une entité peut apparaître sous la forme d'un type ou d'une instance. Les termes «type d'entité» ou «instance
d'entité» sont censés être utilisés lorsqu'une seule entité est désignée.
4.8
identifiant d'entité
identifiant qui désigne de manière unique une instance d'entité
[ISO 19142:2010, définition 4.8]
4.9
référence d'entité
Identifiant de Ressource Uniforme (URI) qui identifie une entité
4.10
capacités de filtre XML
métadonnées, encodées en XML, qui décrivent les prédicats définis dans la présente Norme internationale
qu'un système doit mettre en œuvre
4.11
expression de filtrage
expression de prédicat encodée en utilisant le langage XML
4.12
processeur d'expression de filtre
composant d'un système qui traite une expression de filtre
4.13
fonction
règle qui associe chaque élément à partir d'un domaine (source, ou domaine de la fonction) à un élément
unique dans un autre domaine (cible, co-domaine, ou plage)
[ISO 19107:2003, définition 4.41]
4.14
interface
ensemble nommé d'opérations qui caractérisent le comportement d'une entité
[ISO 19119:2005, définition 4.2]
4.15
valeur littérale
valeur constante, spécifiée de manière explicite
NOTE Celle-ci s'oppose à une valeur qui est déterminée en résolvant une chaîne de substitution (par exemple une
variable).
4.16
prédicat de jointure
expression de filtre qui comprend une ou plusieurs clauses qui contraignent les propriétés de deux types
d'entités différents
NOTE Dans la présente Norme internationale, les types d'entités seront des types de ressources.
4.17
espace de nommage
〈XML〉 ensemble de noms, identifiés par une référence URI, qui sont utilisés dans les documents XML comme
noms d'éléments et noms d'attributs
[W3C XML Namespaces]
4.18
opération
spécification d'une transformation ou d'une interrogation qu'un objet peut être appelé à exécuter
[ISO 19119:2005, définition 4.3]
4.19
prédicat
ensemble d'opérations de calculs appliquées à une instance de données qui évaluent si elle est vraie ou
fausse
4.20
expression de prédicat
syntaxe formelle pour décrire un prédicat
4.21
propriété
facette ou attribut d'un objet référencé par un nom
4.22
requête
appel d'une opération par un client
[ISO 19128:2005, définition 4.10]
4.23
ressource
élément ou moyen qui satisfait à une exigence
[ISO 19115:2003, définition 4.10]
NOTE Dans la présente Norme internationale, une ressource est supposée avoir une identité.
4.24
réponse
résultat d'une opération renvoyé par un serveur à un client
[ISO 19128:2005, définition 4.11]
4.25
service
partie distincte de la fonctionnalité qui est fournie par une entité géographique par l'intermédiaire d'interfaces
[ISO 19119:2005, définition 4.1]
4.26
serveur
instance particulière d'un service
[ISO 19128:2005, définition 4.12]
6 © ISO 2010 – Tous droits réservés
4.27
uplet
listes ordonnées de valeurs
[ISO 19136:2007, définition 4.1.63]
NOTE Dans la présente Norme internationale, la liste ordonnée sera généralement une séquence finie de
ressources.
4.28
Uniform Resource Identifier (URI)
identifiant unique d'une ressource, structuré conformément à l'IETF RFC 2396
[ISO 19136:2007, définition 4.1.65]
NOTE La syntaxe générale est la suivante ::. La syntaxe hiérarchique avec un
espace de nommage est ://?
5 Conventions
5.1 Abréviations
BBOX Bounding Box (Boîte englobante)
CRS Coordinate Reference System (Système de coordonnées de référence)
EBNF Extended Backus-Naur Form
EPSG European Petroleum Survey Group
GML Geography Markup Language (Langage de balisage en géographie)
HTTP Hypertext Transfer Protocol (Protocole de transfert hypertexte)
HTTPS Secure Hypertext Transfer Protocol (Protocole de transfert hypertexte sécurisé)
IETF Internet Engineering Task Force (Groupe de travail IETF)
KVP Keyword-value Pair (Paire mot clé-valeur)
OGC Open Geospatial Consortium
SRS Spatial Reference System (Système de Référence Spatial)
URI Uniform Resource Identifier (Identifiant URI)
URL Uniform Resource Locator (Adresse URL)
URN Uniform Resource Name (Nom URN)
UTC Coordinated Universal Time (Temps universel coordonné)
W3C World Wide Web Consortium
WFS Web Feature Service (Service d'accès aux entités géographiques par le web)
XML Extensible Markup Language (Langage de balisage extensible)
5.2 Notation UML
5.2.1 La Figure 1 décrit les notations du langage de modélisation (UML) utilisées dans la présente Norme
internationale pour des diagrammes de classes UML.
Association entre classes
Association Name
Class #1 Class #2
role-1 role-2
Cardinalité de l’association
Class Class
1.*
Seulement une Une ou plusieurs
Class Class
0.* n
Aucune ou plusieurs Numéro spécifique
Class
0.1
Optionnelle (zéro ou une)
Agrégation entre classes Héritage de classe (sous-type de classes)
Aggregate Class Superclass
Component Class
Subclass #1 Subclass #2 Subclass #n
...............
Figure 1 — Notations UML dans les diagrammes de classes
5.2.2 Dans ces diagrammes de classe, les stéréotypes de classes UML suivants sont utilisés:
a) <> est un descripteur d'un ensemble de valeurs qui n'ont pas d'identité (existence
indépendante et possibilité d'effets de bords). Un élément DataType est une classe n'ayant aucune
opération, dont le but principal est de détenir les informations.
b) <> est un type de données dont les instances forment une liste d'autres valeurs littérales.
Enumeration désigne une courte liste de valeurs potentielles bien identifiées au sein d'une classe.
c) <> est une énumération flexible destinée à exprimer une longue liste d'autres valeurs
potentielles. Si les autres valeurs de la liste sont connues dans le détail, une énumération doit être
utilisée. Si ne sont connues que les valeurs probables, une liste de codes doit être utilisée.
d) <> est une définition d'un ensemble d'opérations qui est pris en charge par des objets
comportant cette interface. Une classe d'interface ne peut contenir aucun attribut.
e) <> est une classe stéréotypée utilisée pour la spécification d'un domaine d'instances (objet) et
des opérations applicables aux objets. Une classe Type peut avoir des attributs et des associations.
f) <> est une liste d'attributs différents où seul un de ces attributs peut être présent à la fois.
Voir également l'ISO/TS 19103:2005, 6.8.2 et D.8.3.
8 © ISO 2010 – Tous droits réservés
5.2.3 Dans la présente Norme internationale, les types de données standard suivants sont utilisés:
a) CharacterString – une chaîne de caractères;
b) LocalisedCharacterString – une chaîne de caractères CharacterString associée à un élément de
localisation;
c) Boolean (booléen) – une valeur spécifiant «TRUE» (VRAI) ou «FALSE» (FAUX);
d) URI – un identifiant d'une ressource qui fournit plus d'informations;
e) Integer (Entier) – un nombre entier.
5.3 Utilisation d'exemples
La présente Norme internationale utilise des exemples en XML. Ils sont destinés à illustrer les divers aspects
de filtres décrits dans la présente Norme internationale. Bien que tous les efforts aient été entrepris pour
garantir que les exemples soient correctement réalisés et valides, cet objectif peut être sacrifié par souci de
clarté. Par exemple, de nombreux exemples sont formatés de manière spécifique pour mettre en valeur un
aspect particulier qui rendrait l'exemple invalide du point de vue d'un outil de validation XML. De plus, la
plupart des exemples se réfèrent à des serveurs et des données factices.
Donc, la présente Norme internationale n'établit pas qu'un exemple encodé en XML, copié à partir du présent
document, s'exécutera nécessairement correctement ou sera validé à l'aide d'un outil de validation XML
particulier.
5.4 Espaces de nommage
Les espaces de nommage (voir W3C XML Namespaces) sont utilisés pour distinguer les vocabulaires XML
les uns des autres. Les espaces de nommage suivants sont utilisés de façon normative dans la présente
Norme internationale:
a) (http://www.opengis.net/fes/2.0) – pour le vocabulaire de filtrage;
b) (http://www.opengis.net/gml/3.2) – pour le vocabulaire GML.
5.5 Listes de paramètres encodés en KVP
La présente Norme internationale définit à la fois les encodages en XML et en KVP pour les expressions
d'interrogation et de filtrage. Plusieurs des paramètres dans l'encodage en KVP sont constitués de listes de
valeurs (voir Tableau 2) et éventuellement de listes de valeurs. Ce paragraphe définit la manière dont les
listes de valeurs doivent être encodées sous forme d'une valeur d'un paramètre.
Les paramètres constitués de listes doivent utiliser la virgule («,») en tant que délimiteur entre les éléments
dans la liste. De plus, de multiples listes peuvent être spécifiées comme étant la valeur d'un paramètre en
entourant chaque liste entre parenthèses: «(«,»)».
EXEMPLE 1 Cet exemple montre une liste d'éléments.
PARAMETER=item1,item2,item3,item4a%2Citem4b
Cette liste est constituée de quatre valeurs: item1, item2, item3 and the value «item4a,item4b» (élément1,
élément2, élément3 et la valeur «élément4a,élément4b»).
NOTE Dans cet exemple, la virgule incorporée dans le dernier élément a été encodée comme selon l'IETF RFC 2396
de manière à la distinguer des virgules utilisées dans la liste d'entrées de liste de délimitation.
EXEMPLE 2 Cet exemple présente de multiples listes d'éléments affectés à un seul paramètre.
PARAMETER=(item11,item12,item13)(item21,item22,item23)
5.6 Fragments de schéma XML
La présente Norme internationale utilise des fragments de schéma XML (voir W3C XML Schema Part 1, W3C
XML Schema Part 2) pour définir l'encodage en XML des composants d'une expression de filtre. Ces
fragments de schéma XML sont regroupés dans un ensemble de fichiers de schéma regroupés à l'Annexe B.
6 Expressions d'interrogation
6.1 Introduction
Une expression d'interrogation (voir Figure 2) est une action qui réalise une recherche sur un certain
ensemble de ressources et renvoie un sous-ensemble de ces ressources. D'autres normes qui font référence
à la présente Norme internationale doivent établir ce que constitue une ressource.
EXEMPLE Un service WFS déterminera qu'une ressource est une entité.
QueryExpression
+ handle [0.1] : CharacterString
AdhocQueryExpression
+ types [1.*] : Type {ordered}
+ projection [0.1] : Any
+ selection [0.1] : Any
+ sorting [0.1] : Any
<>
Type
TypeName
+ name : TypeName
+ ofType : ScopedName
+ alias [0.1] : LocalName
+ ofKind : ScopedName
Figure 2 — Expressions d'interrogation
6.2 Expressions d'interrogation abstraites
La présente Norme internationale définit l'élément abstrait fes:AbstractQueryExpression en tant qu'en-tête
d'un groupe de remplacement d'expressions d'interrogation. L'élément fes:AbstractQueryExpression est défini
par le fragment de schéma XML suivant:
type="fes:AbstractQueryExpressionType" abstract="true"/>
L'élément fes:AbstractQueryExpression définit l'attribut de gestion qui peut être utilisé pour affecter un
identifiant défini par l'utilisateur à l'expression d'interrogation dans le but de gérer une erreur ou de corréler la
réponse à une interrogation, à partir d'une série d'interrogations, avec l'expression d'interrogation source.
Les Normes internationales qui font référence à la présente Norme internationale doivent déclarer le ou les
types de ressources qui peuvent faire l'objet d'une interrogation et doivent obtenir les expressions
d'interrogation de l'élément fes:AbstractQueryExpression.
10 © ISO 2010 – Tous droits réservés
6.3 Expression d'interrogation ad hoc
6.3.1 Introduction
Un type fondamental d'expression d'interrogation est l'expression d'interrogation ad hoc. Il s'agit d'une
expression ad hoc dans le sens que l'interrogation n'est pas connue avant l'instant où elle s'exécute comme,
par exemple, une interrogation mémorisée devrait l'être.
Une expression d'interrogation ad hoc est une expression d'interrogation qui contient les noms d'un ou
plusieurs types de ressources à interroger, une clause de projection optionnelle énumérant les propriétés de
la ressource à présenter dans la réponse, une clause de sélection d'option qui contraint les propriétés de ces
types de ressources de manière à définir un ensemble de résultat et une clause de tri optionnelle spécifiant
l'ordre dans lequel l'ensemble de résultat est présenté.
Ce paragraphe définit l'en-tête d'un groupe de substitution appelé fes:AbstractAdhocQueryExpression à partir
duquel les normes qui font référence à la présente Norme internationale peuvent obtenir les expressions
d'interrogation ad hoc concrètes.
6.3.2 Encodage en XML
Le fragment de schéma XML suivant définit l'élément abstrait fes:AbstractAdhocQueryExpression
type="fes:AbstractAdhocQueryExpressionType"
substitutionGroup="fes:AbstractQueryExpression"
abstract="true"/>
minOccurs="0" maxOccurs="unbounded"/>
type="fes:TypeNamesListType" use="required"/>
type="fes:AliasesType"/>
6.3.3 Encodage en KVP
Le Tableau 2 définit l'encodage en KVP pour une expression d'interrogation ad hoc.
Tableau 2 — Encodage en KVP pour une expression d'interrogation ad hoc
a
Composant URL Description
F/O
a
TYPENAMES Une liste séparée par des virgules de types de ressources à interroger. La
O
(Noms de types) spécification de plusieurs noms indique qu'une jointure est en cours d'exécution.
ALIASES (Pseudonymes) F Une liste séparée par des virgules d'alias (pseudonymes) pour les types de
ressources répertoriés en tant que valeur du paramètre TYPENAMES.
Clause de projection
PROPERTYNAME (Nom de propriété) F Si plus d'un nom de type d'entité est spécifié en tant que valeur du mot clé
TYPENAMES, une liste des listes de paramètres doit être spécifiée (voir 5.5).
Chaque sous-liste doit correspondre 1:1 à chaque nom de type d'entité
mentionné comme la valeur du paramètre TYPENAMES.
Clause de sélection
FILTER F La valeur du paramètre doit être une expression de filtre encodée en utilisant le
(Mutuellement exclusif avec langage spécifié par le paramètre FILTER_LANGUAGE.
RESSOURCEID et BBOX)
FILTER_LANGUAGE F Indique le langage de prédicat utilisé pour encoder l'expression de filtre qui est
la valeur du paramètre FILTER.
La valeur par défaut urn:ogc:def:query Language:OGC-FES:Filter doit être
utilisée pour indiquer que la valeur du paramètre FILTER est une chaîne
encodant le filtre à l'aide d'un fragment XML comme défini dans la présente
Norme internationale.
RESOURCEID F Une liste séparée par des virgules d'identifiants de ressources pour une
(Mutuellement exclusif avec FILTER et récupération à partir d'un entrepôt de données.
BBOX)
BBOX F Un rectangle englobant, encodé comme spécifié dans 06-131r3, indiquant que
(Mutuellement exclusif avec FILTER et toutes les ressources qui intersectent cette BBOX doivent être récupérées à
RESOURCEID) partir d'un entrepôt de données.
Clause de tri
SORTBY F Le paramètre SORTBY est utilisé pour spécifier une liste de références de
valeurs qu'il convient d'utiliser pour ordonner (sur présentation) l'ensemble
d'instances de ressources qui satisfont à l'interrogation. La valeur du paramètre
SORTBY doit avoir la forme «PropertyName [ASC|DESC][,PropertyName
[ASC|DESC],…]» où les lettres ASC sont utilisées pour indiquer un tri croissant
et les lettres DESC sont utilisées pour indiquer un tri décroissant. Si ni ASC, ni
DESC n'est spécifié, l'ordre du tri par défaut doit être croissant. Une valeur
d'exemple serait: «SORTBY=Field1 DESC,Field2 DESC,Field3». Dans ce cas,
les résultats sont triés par le Field 1 (Champ 1) décroissant, le Field2
décroissant et le Field3 croissant.
a
F = Facultatif, O = Obligatoire.
b
Les normes qui font référence à la présente Norme internationale peuvent changer d'exigence pour le paramètre TYPENAME.
Dans de tels cas, la norme de référence doit appuyer par des documents si le paramètre TYPENAME est obligatoire, facultatif ou
obligatoire dans certains cas et facultatif dans d'autres.
6.3.3.1 Examen des paramètres
6.3.3.1.1 Paramètre typeNames (Noms de types)
Le paramètre typeNames obligatoire doit être utilisé dans une expression d'interrogation ad hoc pour encoder
les noms d'un ou plusieurs types de ressources corrélées devant faire l'objet d'une interrogation. Les noms de
types de ressources individuels doivent être encodés comme QName (voir W3C XML Schema Part 2).
NOTE Pour l'encodage en KVP du paramètre typeNames, voir 5.5 pour l'encodage de listes de valeurs.
Les Normes internationales qui dérivent des expressions d'interrogation de fes:AbstractQueryExpression
doivent déclarer le ou les types de ressources qui peuvent faire l'objet d'une interrogation.
12 © ISO 2010 – Tous droits réservés
6.3.3.1.2 Paramètre aliases (pseudonymes)
Le paramètre facultatif aliases peut être utilisé dans une expression d'interrogation ad hoc pour spécifier des
noms différents pour des noms de types de ressources spécifiés comme la valeur du paramètre typeNames.
Un type de ressource alias peut être utilisé n'importe où. Le nom de type de ressource peut être utilisé dans le
contexte de l'expression d'interrogation.
Le nombre d
...


















Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.
Loading comments...