Web Feature Service
From Wikipedia, the free encyclopedia
The OpenGIS Web Feature Service Interface Standard (WFS) is an interface allowing requests for geographical features across the web using platform-independent calls. Geographical features can be thought of as the 'source code' behind a map, where as the WMS interface or online mapping portals like Google Maps return only an image, which can not be edited or spatially analyzed. The XML-based GML is the default payload encoding for transporting the geographic features, but other formats like shapefiles can also be used for transport. In early 2006, the OGC members approved the OpenGIS GML Simple Features Profile [1]. This profile is designed to both increase interoperability between WFS servers and to improve the ease of implementation of the WFS standard.
The OGC membership defined and maintains the WFS specification. There are numerous commercial and open source implementations of the WFS interface standard, including a Open Source WFS reference implementation, called GeoServer. A comprehensive list of WFS implementations can be found at the OGC Implementing Products page [2].
Contents |
[edit] Overview
The WFS specification defines interfaces for describing data manipulation operations of geographic features. Data manipulation operations include the ability to:
- Create a new feature instance
- Delete a feature instance
- Update a feature instance
- Get or Query features based on spatial and non-spatial constraints
The basic Web Feature Service allows querying and retrieval of features. A transactional Web Feature Service (WFS-T) allows creation, deletion, and updating of features.
A WFS describes discovery, query, or data transformation operations. The request is generated on the client and is posted to a web feature server using HTTP. The web feature server then executes the request. The WFS specification uses HTTP as the distributed computing platform, although this is not a hard requirement.
There are two encodings defined for WFS operations:
[edit] Communication Models
The WFS Web Feature Services or Web Feature Server specification supports two communication models:
- Stateless Request Reply
- Pub/Sub
-
- A messaging system in which clients address messages to a specific node in a content hierarchy, called a topic. Publishers and subscribers are generally anonymous and can dynamically publish or subscribe to the content hierarchy. The system takes care of distributing the messages arriving from a node's multiple publishers to its multiple subscribers. Messages are generally not persistent and will only be received by subscribers who are listening at the time the message is sent. A special case known as a “durable subscription” allows subscribers to receive messages sent while the subscribers are not active. (Source: http://java.sun.com/j2ee/1.4/docs/glossary.html)
The WNS is one of the implementation specifications for the Pub/Sub model. Regardless of the model, URL format is used and specified in the WFS specification. At this time there are no open-standard implementations of WNSs. Vendors plan to release implementations once the standard has been ratified.
[edit] Data
The Geography Markup Language (GML) passes data back and forth between a Web Feature Server and a client. GML normally communicates geospatial data but also supports other types of data.
GML GML expresses feature data in and out of a feature server. The GML standard is at V2.0 and is defined by the WFS Web Feature Services or Web Feature Server 1.0 specification. This standard covers the following new topics:
- Coordinates
- Geometry (e.g., polygons)
V3.0 of the specification, which is currently being released, includes Topology, which enables the expression of facts such as "Road A ends at Road B."
[edit] Public Interfaces
[edit] Static Interfaces
The static interface model for the OGC Web Service model appears in the figure below.
The Transaction and LockFeature operations are also optional.
When writing a WFS , you must implement the following operations:
- GetCapabilities - this queries the WFS service to determine available options.
- DescribeFeatureType - this retrieves the XML schema to allow the WFS client to parse the resultsets.
- GetFeature - this performs the actual query - parameters such as bounding box and any other filters should be passed in, as appropriate, and the WFS service then returns a GML resultset containing full geometry and feature attributes.
[edit] Dynamic interfaces
The dynamic request/reply interface model for the OGC Web Service model appears in the figure below.
[edit] Dynamic interface updates
The client gets updates by one of two mechanisms:
- Notification: Recommended but not mandatory. Depends on the availability of a WMS implementation.
- Polling: Use this method if a WMS implementation is not available.
WFS dynamic interface web notification model
This model uses the OGC Web Notification Service to send update notifications to registered clients. The Notification interface appears in the figure below.
WFS dynamic interface web notification polling model
The polling model interface appears in the figure below.