OpenGIS WMS protocol

The OpenGIS Consortium, Inc. (OGC) is a member-driven, non-profit international trade association that lead the development of geo-processing interoperability computing standards. OGC works with government, private industry, and academia to create open and extensible software application programming interfaces for geographic information systems (GIS) and other mainstream technologies. Adopted specifications are available for public use at no cost.

When you visit the OpenGIS web site you may be overwhelmed by all the information there, the consortium has been working on various open standards, the Web Map Server (WMS) specification fortunately is the simplest one.

The WMS specification has been revised several times over the past few years and it has become quite a comprehensive document. We have found that most of our users find the WMS specification document somewhat intimidating because of its volume; therefore we decided to include a brief introduction to how the protocol works.

GetMap request

The GetMap request is the core of the WMS protocol. To allow web developers to incorporate a map server in the HTML pages making up a web application the request is a simple HTTP URL, which returns a bitmap image for the requested map.

As an example, we will explain to you how to use our WMS server world map demo to make a map of Africa displaying the land, coastline and country borders using the 1.1.0 protocol version. To do this, we will compose the URL for the map piece by piece:

1) Base URL, protocol version and request type

This is a more or less static part of the url, defining the location of the server and the protocol version:

2) Bounding Box, projection and image size

This defines the extent of the area to zoom in to and the size of the map.

The extent, which is called BBOX contains 4 coordinates, xMin, yMin, xMax and yMax and the bitmap width and height are specified separately. As the continent of Africa extends from about -20 to +60 degrees longitude and -40 to +40 degrees latitude we specify:


Specifying the projection is a bit more complicated, in this example all you need to know is that the geographic Lat-Lon co-ordinate system we used for the world map is the most common one and can be specified using an EPSG code:


As the BBox we specified covers 80 x 80 degrees, the map width and height should be equal or the map aspect ratio will be distorted:


3) Layers to be displayed

To make a map displaying the land, coastline and country borders we specify:


3) Image format

To make a GIF format image we specify:


4) combine the above parameters by appending them together, separated by ampersand (&) characters:,-40,60,40&SRS=EPSG:4326&Width=400&Height=400&Layers=Countries,Borders,Coastlines&Format=image/gif

By copying and pasting this URL into your browser (or by simply clicking on it) you will get this map image of Africa:

Playing around with the URL in your browser address bar, you should be able to get a basic understanding of the protocol, how to add other layers, zoom in on another area of the world, request a different image format etc..

GetCapabilities Request

In order to be able to compose a request URL as in the above example, you will first need specific information on the map, which layers are available and how the co-ordinate system is defined, what WMS protocol version it supports and which image formats can be requested.

The getcapabilities request provides this information by returning a XML file with a well defined structure containing specific information on the WMS server and the map / layers it provides.

For the details on how this works, please refer to the official Web Map Server (WMS) specification.

For a quick impression, here is an example of a request URL:

GetFeatureInfo Request

The GetFeatureInfo request is an optional request which allows a user to click on the map and retrieve information about the features in one or more specific map layers.

For example, in our world map demo, by using the query button and clicking on a country, you can see the country code (NIMA) and name. For a detailed description of how this works, please refer to the official Web Map Server (WMS) specification.

Because the structure of the GetFeatureInfo output is not very well defined by the WMS specification and your particular requirements may be very application specific, this feature may need some customizing where you parse the feature_id to link it to an external (SQL) database using custom scripting.

Demis WMS 4.0 base URL

The example above was in fact using the “classic” world map demo script we have been running with version 3.0 for quite some time now. Because there can be multiple maps running on a server, in Demis WMS version 4.0 we have included a common “gateway” script you can use to access all maps without hardcoding a separate script to each of them.

The “classic” URL for the world map therefore changes from:   (hardcoded to the world map)

to:   (can be used for all maps on the server)

Please note that the WMS=WorldMap parameter is a so-called Vendor Specific Parameter (VSP) which is not part of the WMS protocol yet perfectly legal to add according to the specs. This parameter is just added in the connecting ASP/ASP.NET script so you can access a collection of maps through a common “connector” without requiring separate scripts for each of them.

To demonstrate this, you can take the URL from the Africa example above, this would become:


This URL is slightly different, the result is the same.

Now if we replace WMS=WorldMap to WMS=BlueMarble we can try to connect to another map running on this server:


This will give you a similar image to the one above, but the land is not green and borders are red.

This is because we have changed it to a different map, which typically contains different layers. Now try replacing “Countries” with “Earth Image”

BBox=-20,-40,60,40&SRS=EPSG:4326&Width=400&Height=400&Layers=Earth Image,Borders,Coastlines&Format=image/gif

Now you have used the same wms.ashx script to connect to a different map (NASA Blue Marble):


Official specifications repository

You can find the official documents on the, because the urls there occasionally change we have also posted a copy of theres documents on our web server here:

WMS 1.0.0 specification

WMS 1.1.0 specification

WMS 1.1.1 specification

WMS 1.3.0 specification

DemisWMS is officially certified as a WMS 1.1.1 compliant product.