Language selection

Search


Web Map Service (WMS)

Overview

A Web Map Service (WMS) defines an interface that allows a client to get maps of geospatial data and gain detailed information on specific features shown on the map. A "map" is defined here as a visual representation of geospatial data, not the geospatial data itself.

A Web Map Service can:

  1. Produce a map – as a picture, as a series of graphical elements, or as a packaged set of geographic feature data;
  2. Answer basic queries about the content of a map; and
  3. Tell a client what maps it can produce and which of those can be queried further.

Unlike a Web Coverage Service (WCS) or a Web Feature Service (WFS), WMS is not intended to provide access to the original unprocessed data.

A Web Map Service can act as a client by combining a number of images served by other WMS servers. It can also accommodate an extension using a Styled Layer Descriptor (SLD) and Symbology Encoding (SE), and offers the capability to restrict which features are displayed by using a filter as defined by a Filter Encoding (FE) specification.

Additional Information

 

Standard      

OpenGIS® Web Map Service (WMS) Implementation Specification

 

Related Information

Web Coverage Service (WCS)

Web Feature Service (WFS)

Styled Layer Descriptor (SLD)

Symbology Encoding (SE)

Filter Encoding

Table Joining Service (TJS)

 

Notes

The Web Map Service Implementation Specification was developed by the Open Geospatial Consortium (OGC).

Users may find the following OGC® tutorial useful: Introduction to WMS.

 

Additional Information: Web Map Service (WMS)

Description

GetCapabilities

GetMap

GetFeatureInfo

 

This information provides a high-level overview of the WMS interface specification, including an overview of each of the operations that are supported. Please refer to the OpenGIS® Web Map Service (WMS) Implementation Specification for technical details.

 

Description

The main function of the WMS is to provide rendered geospatial data as maps. There are two types of WMS:

  1. Basic WMS, which provides map layers in pre-defined styles. Using a basic WMS, a client can only choose a style from a pre-defined list of styles to portray a particular map layer. A basic WMS may have direct access to the data store; and
  2. Enabled WMS, using a Styled Layer Descriptor (SLD) that will need to work together with Symbology Encoding (SE) anda Web Feature Service (WFS). The WMS functions as a rendering tool, while the WFS provides source data. With a SLD-enabled WMS, a client has access to the SLD, the SE provides a symbol/style library, and the client can instruct the WMS on the styles to be used and the features to be rendered for a particular map, to create custom-styled maps.

Both types of WMS can return geospatial data in either of two map formats:

  1. "Picture" formats, which include common image formats such as GIF (Graphics Interchange Format), PNG (Portable Network Graphics), and JPEG (Joint Photographics Expert Group); or
  2. "Graphic element" formats, which include SVG (Scalable Vector Graphics) or WebCGM (Web Computer Graphics Metafile).

CGDI/OGC does not specify or enforce any particular format, although a format that provides transparency is recommended, if composite maps with multiple layers are to be produced.

 

A WMS interface consists of the following mandatory and optional operations:

Mandatory:

  • GetCapabilities
  • GetMap

 

Optional:

  • GetFeatureInfo

Optional for SLD-enabled WMS:

  • DescribeLayer
  • GetLegendGraphic
  • GetStyles
  • PutStyles

The mandatory and optional parameters for the WMS interface operations are discussed below.

 

 

 

GetCapabilities

GetCapabilities returns an XML document describing the service and the data collections from which clients may request maps. This operation is common to all CGDI/OGC web services, and is discussed in detail in the OGC® Web Service Common Implementation Specification.

The specific and most critical piece of the WMS Capabilities coding is the “Layers and Styles” it defines. Each available map is advertised by a <Layer> element, with layer properties (Title, Name, SRS, Style…), and layer attributes (queryable, Cascaded …). A parent layer may enclose numbers of children layers, and can be hierarchically nested. Some properties defined in a parent layer are inherited by the children layers.

The complete XML Document Type Definition (DTD) is included in the OGC® Web Service Common Implementation Specification. The DTD specifies the required and optional contents of the response and how the contents are formatted.

 

 

GetMap

GetMap provides a means for a client to request maps of geo-referenced data.

 

GetMap Request:

Mandatory:

Note:The name of this parameter in version 1.0.0 was "WMTVER". For backward compatibility, a post-1.0.0 server should accept either “WMTVER” or “VERSION”.

  • REQUEST: “GetMap”.

  • LAYERS: provide a comma-separated list of layers to be returned. The layers will be rendered in the manner of “the leftmost, the bottommost”.

  • STYLES: provide a comma-separated list of style names. There must be a one-to-one correspondence between the values in the LAYERS parameter and the values in the STYLES parameter.

  • SRS: namespace identifier to specify Spatial Reference System.

  • FORMAT: the format to be used to return the map.

  • BBOX: minx, miny, maxx, maxy – to specify the coordinates of bounding box corners in the  SRS. This defines the spatial boundary to be used for map generation.

  • WIDTH, HEIGHT: numbers to specify the size of the map in pixels. These parameters are only used for maps returned in picture formats. If the WIDTH /HEIGHT ratio is different from the ratio specified by the  BBOX, the server must re-render the map to fit in the WIDTH and HEIGHT picture frame. If a layer is declared to have fixed width and height, the server will only accept the declared numbers, and will issue a Service Exception for any other numbers.

Optional:

  • BGCOLOR: a hexadecimal encoding of an  RGB value. It is used to specify the color to be used as the background of the map. The default value is 0xFFFFFF (corresponding to the color white).

  • TRANSPARENT:  TRUE/FALSE, to specify whether the map background is to be made transparent or filled using BGCOLOR. It is only used when a picture format is specified. The default value is “FALSE”.

  • EXCEPTIONS: the format in which errors are reported to the client. The default value is “application/vnd.ogc.se_xml”.

  • TIME, ELEVATION, OTHER sample dimensions: these parameters are used to handle multi-dimensional data. For detailed information, refer to Annex C of  OpenGIS® Web Map Service Implementation Specification.

  • Vendor-specific parameters: experimental parameters.

Optional for SLD-enabled  WMS only:

GetMap Response:  GetMap returns a map of geospatial data, in the requested format, style, spatial reference system, bounding box, size, transparency, and other specified characteristics. If a request is invalid, an error output is returned in the requested or default Exceptions format.

 

 

GetFeatureInfo

The GetFeatureInfo operation is designed to provide clients with more information about particular features shown on previously requested maps.

To illustrate: A typical use case for GetFeatureInfo is that a user sees a map from a GetMap request and chooses a point on that map for which to obtain more information. Because the WMS protocol is stateless, the client must include the original GetMap request parameters (all but VERSION and REQUEST) in the GetFeatureInfo request, to inform the server what map the client is viewing. (Note: In the current WMS version, this operation is only defined for maps in picture formats.)

In addition, what a WMS exactly returns is left up to the WMS provider.

 

GetFeatureInfo Request :

Mandatory:

  • VERSION: the requested version. For the use of version and the version negotiation, please refer to the OGC® Web Service Common Implementation Specification.
  • REQUEST: “GetFeatureInfo”.
  • map_request_copy: a place-holder for resubmitting the GetMap request parameters. VERSION and REQUEST must be omitted from the GetMap request, because GetFeatureInfo provides its own values.
  • QUERY_LAYERS: a comma-separated list of map layers from which feature information is to be retrieved. It must contain at least one layer name.
  •   X , Y:  a point of interest on the map. The point is within the borders of the WIDTH and HEIGHT parameters of the embedded GetMap request. The origin is set to (0,0) at the upper left corner.
  •   INFO _FORMAT: the format to be used when returning the feature information.

      Note: In early versions of the OGC® specification this was defined as an optional parameter, but without specifying a default value. In more recent versions, this is defined as a mandatory parameter.

Optional:

  • FEATURE_COUNT: a number to specify the maximum number of features for which feature information should be returned. The default value is 1.
  • EXCEPTIONS: the format in which errors are reported to the client. At the time of writing, the only valid value is the default value: “application/vnd.ogc.se_xml”.
  •   Vendor-specific parameters: experimental parameters.

For a SLD-enabled WMS, the following also apply:

  • DescribeLayer
  • GetLegendGraphic
  • GetStyles
  • PutStyles

Please refer to the OpenGIS® Styled Layer Descriptor Profile of the Web Map Service Implementation Specification and the OpenGIS® Symbology Encoding Implementation Specification for details regarding these operations.

 

Page details

Date modified: