.. _wfs: ***************************************************************************** WFS ***************************************************************************** WFS is an Open Geospatial Consortium (OGC) specification. For more information about the format itself, see: http://www.opengeospatial.org/standards/wfs WFS allows a client to retrieve geospatial data encoded in Geography Markup Language (GML) from multiple Web Feature Services. GML is built on the standard web language XML. WFS differs from the popular Web Map Service (WMS) specification in that WFS returns a subset of the data in valid GML format, not just a graphic image of data. Capabilities ------------------- Requesting the capabilities using the GetCapabilities request to a WFS server returns an XML document showing what layers and projections are available, etc. Example of a WFS GetCapabilities URL: http://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities Example of the Resulting XML from GetCapabilties: :: ... continents World continents EPSG:4326 cities World cities EPSG:4326 ... Data Access / Connection Method --------------------------------- * WFS access is a core MapServer feature. MapServer currently supports WFS version 1.0.0 * The CONNECTIONTYPE WFS parameter must be used. * WFS layers can be requested through a layer in a map file, or you can request the GML directly through the browser with a GetFeature request. You can specify a specific layer with the TypeName request. In a map file the name/value pairs should be put into a METADATA object. * You can limit the number of features returned in the GML by using the MaxFeatures option (e.g. &MAXFEATURES=100). Example of a WFS Request Directly Through the Browser: The following URL requests the GML for the layer continents. (see the GetCapabilities above for the possible layers available on this test server) . The URL is all one line, broken up here for readability (click `here `__ for a working link). :: http://demo.mapserver.org/cgi-bin/wfs? SERVICE=WFS& VERSION=1.0.0& REQUEST=getfeature& TYPENAME=continents& MAXFEATURES=100 Map File Example ---------------- .. code-block:: mapfile LAYER NAME "continents" TYPE POLYGON STATUS ON CONNECTION "http://demo.mapserver.org/cgi-bin/wfs?" CONNECTIONTYPE WFS METADATA "wfs_typename" "continents" "wfs_version" "1.0.0" "wfs_connectiontimeout" "60" "wfs_maxfeatures" "10" END PROJECTION "init=epsg:4326" END CLASS NAME "Continents" STYLE COLOR 255 128 128 OUTLINECOLOR 96 96 96 END END END # Layer