WFS Simple - DescribeFeatureType operation
WFS Simple assumes that the primary way of understanding how to use the data will involve
making sample requests and examining the responses. Based upon that assumption, the
DescribeFeatureType operation does not need to normatively describe the schema of the
data being served. Instead, we use DescribeFeatureType for three things:
- specifying which variables can be queried (queryable attribute)
- adding metadata about variables that can aid client developers to build better user interfaces (title attribute)
- adding metadata about variables that can aid data harvesting use cases (data type attribute)
Request
Here is the minimal valid data description request. This is the same as the WFS 1.1 mandatory parameter, but in the case of WFS Simple, there is only one feature type offered by the service, so in the response, only one feature type should be described.
http://example.com/wfs?service=WFSSIMPLE&version=0.5&REQUEST=DescribeFeatureType
| Key | Description | Default | Mandatory? | In WFS 1.1? |
REQUEST |
Data description operation. Value must be DescribeFeatureType. | n/a | Y | Y |
Response
The response to DescribeFeatureType shall describe the data's layout. As is the case with WFS, the format for doing this depends upon what is advertised in the service's capabilities, but whatever system is used, it should have three components:
- a narrative description of the data that repeats and/or more fully explains the data's layout
- a listing of properties (attributes) that can be queried using a regular expression
- a more formal data description, preferably those offered by schema description languages like XML Schema, RELAX NG and DTD
None of these components are strictly required by WFS Simple. They add useful information for clients to construct queries, but the basic functionality of WFS Simple may still be fulfilled without a DescribeFeatureType operation. This page details two preferred formats for data description, XML (optionally bound to XML Schema), and plain text (GML is, of course, a preferred data description type but that option is well described in the WFS specification).
BXFS Data Description (Basic XML Feature Schema)
BXFS is the preferred way of describing a data sets for WFS Simple. It uses XML Schema to fulfill the three goals listed above. It deviates slightly from XML's data typing scheme, by defining a list of acceptable data types harmonized from XML, SQL, and GeoRSS GML. This creates a comprehensive baseline that all WFS Simple services and clients should be able to understand, and therefore promotes the highest level of interoperability across all WFS Simple services.
The normative schema is found at this link, with the DescribeFeatureType response is the element called <FeatureDescription>.
There are samples of how to implement this with flat databases and Atom+GeoRSS GML.
Arbitrary Text Data Description
It is important to note that a perfectly valid way of describing the information model is in a narrative format. This is particularly useful for legacy data formats like ASCII that may not look anything like a relational database or XML schema. You could advertise this in capabilities as a DescribeFeatureType return value of text/plain. The response would be a simple paragraph describing the data layout. This example illustrates the flexibility of the service API, but note that this method is highly discouraged, as it hinders data interoperability and fits poorly into any concept of information flows in the World Wide Web.
The response contains information for sites in the following format: (750 records)
FORMAT A8,1X,F6,1X,F4,1X,19F7
(A8) Observation Station
(F6) Sample Date, yymmdd
(F4) Sample Time, hhmm
(F7) Stream Flow, cfs
One useful application for the arbitrary text format is describing an Atom RSS feed with GeoRSS location extensions. Atom has no XML Schema description, while GeoRSS does. Atom, however, does have a RELAX NG description while GeoRSS doesn't. Encoding these nuances is extremely difficult formally, but extremely easy and clear in a narrative. Here is one way to handle this case.
The response is XML that conforms to the Atom Syndication format <http://www.ietf.org/rfc/rfc4287.txt> with GeoRSS extensions <http://www.georss.org/atom.html>

