wfs:Query
The Query element is used to describe a single query. One or more Query elements can be specified inside a GetFeature element so that multiple queries can be executed in one request. The output from the various queries are combined in a wfs:FeatureCollection element to form the response document.
Element information
Namespace: http://niem.gov/niem/external/ogc-wfs/1.1.0/dhs-gmo/1.0.0
Schema document: external/ogc-wfs/1.1.0/dhs-gmo/1.0.0/wfs.xsd
Type: wfs:QueryType
Properties: Global, Qualified
Content
- Sequence [1..1]
- Choice [0..*]
- wfs:PropertyName
- wfs:XlinkPropertyName This element may be used in place of an wfs:PropertyName element in a wfs:Query element in a wfs:GetFeature element to selectively request the traversal of nested XLinks in the returned element for the named property. This element may not be used in other requests -- GetFeatureWithLock, LockFeature, Insert, Update, Delete -- in this version of the WFS specification.
- ogc:Function A function may be used as a select item in a query. However, if a function is used, care must be taken to ensure that the result type matches the type in the
from subst. group wfs:PropertyName - ogc:Filter [0..1] The Filter element is used to define spatial and/or non-spatial constraints on query. Spatial constrains use GML3 to specify the constraining geometry. A full description of the Filter element can be found in the Filter Encoding Implementation Specification.
- ogc:SortBy [0..1] The SortBy element is used specify property names whose values should be used to order (upon presentation) the set of feature instances that satisfy the query.
- Choice [0..*]
Attributes
Name | Occ | Type | Description | Notes |
---|---|---|---|---|
handle | [0..1] | xsd:string | The handle attribute allows a client application to assign a client-generated identifier for the Query. The handle is included to facilitate error reporting. If one Query in a GetFeature request causes an exception, a WFS may report the handle to indicate which query element failed. If the a handle is not present, the WFS may use other means to localize the error (e.g. line numbers). | |
typeName | [1..1] | wfs:TypeNameListType | The typeName attribute is a list of one or more feature type names that indicate which types of feature instances should be included in the reponse set. Specifying more than one typename indicates that a join operation is being performed. All the names in the typeName list must be valid types that belong to this query's feature content as defined by the GML Application Schema. | |
featureVersion | [0..1] | xsd:string | For systems that implement versioning, the featureVersion attribute is used to specify which version of a particular feature instance is to be retrieved. A value of ALL means that all versions should be retrieved. An integer value 'i', means that the ith version should be retrieve if it exists or the most recent version otherwise. | |
srsName | [0..1] | xsd:anyURI | This attribute is used to specify a specific WFS-supported SRS that should be used for returned feature geometries. The value may be the WFS StorageSRS value, DefaultRetrievalSRS value, or one of AdditionalSRS values. If no srsName value is supplied, then the features will be returned using either the DefaultRetrievalSRS, if specified, and StorageSRS otherwise. For feature types with no spatial properties, this attribute must not be specified or ignored if it is specified. |
Used in
- Type wfs:GetFeatureType (Element wfs:GetFeature)
- Type wfs:GetFeatureWithLockType (Element wfs:GetFeatureWithLock)
Sample instance
<wfs:Query typeName="QName QName"> <wfs:PropertyName>QName</wfs:PropertyName> <ogc:Filter> <ogc:Equals> <ogc:PropertyName/> <gml:Point>... </gml:Point> </ogc:Equals> </ogc:Filter> <ogc:SortBy> <ogc:SortProperty> <ogc:PropertyName/> <ogc:SortOrder>DESC</ogc:SortOrder> </ogc:SortProperty> </ogc:SortBy> </wfs:Query>