 | What is DescribeFeatureType?
The DescribeFeatureType WFS operation returns the XSD schema information for a set of FeatureTypes. The schema describes the property names and types associated with the FeatureType. |
 | What is a FeatureType?
A FeatureType is a a single concrete type of gml feature (as defined by an Application Schema .XSD). It is usually named with a "prefix:name" tag to uniquely identify it relative to other FeatureType names.
A FeatureType is often (but not always) synonymous with a dataset or layer. A dataset may contain multiple FeatureTypes - for example, the "City" dataset may contain "ny:Road" and "ny:Building" FeatureTypes. |
When to make a DescribeFeatureType request
Make a DescribeFeatureType request when you want to know more detailed information about the schema for a FeatureType. The response will tell you the FeatureType's property names, types, and restrictions.
How to make a DescribeFeatureType request
The DescribeFeatureType request can be made to either:
- request the FeatureType schema of a single type
- request the FeatureType schema for multiple types
Using HTTP GET:
http: TYPENAME=cdf:Locks
http: TYPENAME=cdf:Deletes,cdf:Inserts,cdf:Updates,cdf:Nulls,cdf:Fifteen,cdf:Other,cdf:Seven
You can specify multiple type names (in prefix:name format).
Using HTTP POST:
<?xml version="1.0"?>
<wfs:DescribeFeatureType
version="1.0.0"
service="WFS"
xmlns:wfs="http:
xmlns:xsi="http:
xsi:schemaLocation="http:>
<wfs:TypeName>cdf:Deletes</wfs:TypeName>
<wfs:TypeName>cdf:Inserts</wfs:TypeName>
<wfs:TypeName>cdf:Updates</wfs:TypeName>
<wfs:TypeName>cdf:Nulls</wfs:TypeName>
<wfs:TypeName>cdf:Fifteen</wfs:TypeName>
<wfs:TypeName>cdf:Seven</wfs:TypeName>
</wfs:DescribeFeatureType>
Format of a DescribeFeatureType response
The response will be an XSD schema file that describes the FeatureType schemas that you requested.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
targetNamespace="http://www.opengis.net/cite/data"
xmlns:cdf="http://www.opengis.net/cite/data"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified" version="1.0">
<xs:import namespace="http://www.opengis.net/gml"
schemaLocation="http://localhost:8080/geoserver/data/capabilities/gml/2.1.2/feature.xsd"/>
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Deletes_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="boundedBy" minOccurs="0" nillable="true" type="gml:PolygonPropertyType"/>
<xs:element name="id" minOccurs="0" nillable="true" type="xs:string"/>
<xs:element name="pointProperty" minOccurs="0" nillable="true" type="gml:PointPropertyType"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Inserts_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="boundedBy" minOccurs="0" nillable="true" type="gml:PolygonPropertyType"/>
<xs:element name="id" minOccurs="0" nillable="true" type="xs:string"/>
<xs:element name="pointProperty" minOccurs="0" nillable="true" type="gml:PointPropertyType"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name='Inserts' type='cdf:Inserts_Type' substitutionGroup='gml:_Feature'/>
<xs:element name='Deletes' type='cdf:Deletes_Type' substitutionGroup='gml:_Feature'/>
</xs:schema>
Both cdf:Deletes and cdf:Inserts have the same schema -
| Property Name |
PropertyType |
| boundedBy |
GML Polygon |
| id |
string |
| pointProperty |
GML Point Geometry |
 | Describing FeatureTypes in multiple namespaces!
It is not legal for an XSD schema file to contain the schema of objects in multiple namespaces. In order to get around this, the DescribeFeatureType will generate a schema file which includes multiple other schema files. This is an example response for a request for FeatureTypes in two namespaces - cdf (Locks and Deletes) and cgf (Lines and Points).
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified" version="1.0">
<xs:import namespace="http://www.opengis.net/cite/data"
schemaLocation="http://host/geoserver/wfs/DescribeFeatureType?typeName=cdf:Locks,cdf:Deletes"/>
<xs:import namespace="http://www.opengis.net/cite/geometry"
schemaLocation="http://host/geoserver/wfs/DescribeFeatureType?typeName=cgf:Lines,cgf:Points"/>
</xs:schema>
XML/XSD parsers will automatically process a file in this format.
|