GML-Based Request

The request to the web service for any of the operations can be sent as a GML-based request instead of the plain Get URL. The key and value pair of parameters that we send to the server is now sent through the GML-based request in the following way:

Copy
<?xml version="1.0" encoding="utf-8"?>
<GetCoverage
    xmlns="http://www.opengis.net/WCS"
    xmlns:DigitalGlobe=http://www.digitalglobe.com
    xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:gml="http://www.opengis.net/gml" service="WCS"
version="1.1.0" outputFormat="text/xml; subtype=gml/3.1.1" maxFeatures="100" handle="" >
    <Query typeName="DigitalGlobe:FinishedFeature" srsName="urn:x-ogc:def: crs:EPSG:4326">
        <ogc:Filter>
            <ogc:Intersects>
                <ogc:PropertyName>geometry</ogc:PropertyName>
                <gml:Envelope srsName="urn:x-ogc:def:crs:EPSG:4326"
                    xmlns:gml="http://www.opengis.net/gml">
                    <gml:lowerCorner>-90 -180</gml:lowerCorner>
                    <gml:upperCorner>90 180</gml:upperCorner>
                </gml:Envelope>
            </ogc:Intersects>
        </ogc:Filter>
    </Query>
</GetCoverage>

The <GetCoverage> element contains one or more <Query> elements, each of which contain the description of a query. The results of all queries contained in a GetCoverage request are concatenated to produce the result set.

The outputFormat attribute defines the format needed to generate the result set. The default value is GML2.

The optional maxFeatures attribute can be used to limit the number of Features that a GetCoverage request retrieves. Once the maxFeatures limit is reached, the result set is truncated at that point.

Each individual query packaged in a GetCoverage request is defined using the <Query> element. The <Query> element defines which Feature type to query, what properties to retrieve and what constraints (spatial and non-spatial) to apply to those properties.

The typeName attribute is used to indicate the name of the Feature type or class to be queried.

The featureVersion attribute is included in order to accommodate systems that support Feature versioning. A value of ALL indicates that all versions of a Feature should be fetched. Otherwise, an integer, n, can be specified to return the nth version of a Feature. The version numbers start at 1, which is the oldest version. If a version value larger than the largest version number is specified, then the latest version is returned. The default action shall be for the query to return the latest version. Systems that do not support versioning can ignore the parameter and return the only version that they have.

The <PropertyName> element is used to enumerate the Feature properties that should be selected during a query and whose values should be included in the response to a GetCoverage request. A client application can determine the properties of a Feature by making a DescribeCoverageType request before composing a GetCoverage request.

The DescribeCoverageType operation will generate a GML application schema defining the schema of the Feature type. The client can then select the properties to be fetched. In addition, the client can determine which Feature properties are mandatory and must be fetched in order for the service to be able to generate an instance of the Feature type that will validate against the generated GML application schema. In the event that a web service encounters a query that does not select all mandatory properties of a Feature, the web service will internally augment the property name list to include all necessary property names. A web service client must therefore be prepared to deal with a situation where it receives more property values than it requests.

If no <PropertyName> elements are specified, then all Feature properties should be fetched.

The <Filter> element can be used to define constraints on a query. Both spatial and/or non-spatial constraints can be specified as described in the Filter Encoding Specification. If no <Filter> element is contained within the <Query> element, then the query is unconstrained and all Feature instances should be retrieved.