You are here

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:

Produce a map – as a picture, as a series of graphical elements, or as a packaged set of geographic feature data;

Answer basic queries about the content of a map; and

Tell a client what maps it can produce and which of those can be queried further.

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

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

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:

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.

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”.

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.