DescribeFeatureType

Use the DescribeFeatureType request to obtain a schema description for features serviced by the OGC Web Feature Service (WFS). The schema description describes how feature instances are expected to be encoded (described) on input and how feature instances are generated on output. WFS is able, upon request, to describe the structure of any feature type it can service. The service returns the metadata (description) of a specific feature type (content) based on the returned GetCapabilities.

POST Request

The sample below calls the DescribeFeatureType method to get the description of a feature type called World. The response is an XML Schema. The request schema is defined by the following XML Schema fragment:

<xsd:elementname="DescribeFeatureType" type="wfs:DescribeFeatureTypeType"/>
<xsd:complexTypename="DescribeFeatureTypeType">
    <xsd:sequence>
        <xsd:elementname="TypeName" type="xsd:QName" minOccurs="0"
        maxOccurs="unbounded"/>
    </xsd:sequence> 
    <xsd:attributename="version" type="xsd:string"use="required"/>
    <xsd:attributename="service"
        type="xsd:string"use="required" fixed="WFS"/>
    <xsd:attributename="outputFormat"
        type="xsd:string"use="optional" default="text/xml; subtype=gml/3.1.1"/>
</xsd:complexType>

GET Request

The GET request contains:

Input Required Description
SERVICE=WFS Yes Fixed to WFS.
VERSION Yes Fixed to 2.0.2. This is the version of the Web Feature Service standard implemented in this release (1.0.0, 1.1.0, 2.0.0, or 2.0.2).
REQUEST=DescribeFeatureType Yes Set to DescribeFeatureType for a describe feature type operation.
OUTPUTFORMAT No Dependent on the version:
  • For 1.0.0, the default is text/xml; subtype=gml/2.1.2.
  • For 1.1.0, the default is text/xml; subtype=gml/3.1.1.
  • For 2.0.0 and 2.0.2, the default is application/gml+xml;version=3.2.
TYPENAME Yes A comma-separated list of feature types. If no value is specified, that is interpreted as all feature types.

For example:

http://server:port/rest/Spatial/WFS?SERVICE=WFS&ACCEPTVERSIONS=1.1,1.0.0&REQUEST=DescribeFeatureType&TYPENAME=World