Introduction to the OpenGeo Suite
Web Map Service (WMS)¶
A fundamental component of the web map (and likely the simplest to understand) is the map image. The Web Map Service (WMS) is a standard protocol for serving georeferenced map images generated by a map server.
In short, WMS is a way for a client to request map images from a server. The client sends a request to a map server, then the map server generates an image based on parameters passed to the server in the request and finally returns an image.
The source material from which the image is generated need not be an image. The WMS generates an image from whatever source material is requested, which could be vector data, raster data, or a combination of the two.
Sample WMS request¶
The following is a sample WMS request, rendered as a HTTP GET request (with line breaks added for clarity) to a hosted GeoServer instance:
http://suite.opengeo.org/geoserver/wms? SERVICE=WMS& VERSION=1.3.0& REQUEST=GetMap& LAYERS=usa:states& SRS=EPSG:4326& BBOX=24.956,-124.731,49.372,-66.97& FORMAT=image/png& WIDTH=600& HEIGHT=255
While the details of the WMS protocol are beyond the scope of this course, a quick scan of this request shows that the following information is being requested:
- Server details (a WMS 1.3.0 request)
- Request type (a WMS GetMap request)
- Layer name (usa:states)
- Projection (EPSG:4326)
- Bounding box (in this case, latitude/longitude coordinates)
- Image properties (600x255 PNG)
If you paste the request into a browser, the result would be:
Other WMS requests¶
A WMS request can ask for more than just a map image (“GetMap”).
An example of another such request is a request for information about the WMS server itself.
The request is called GetCapabilities, and the response is known as the capabilities document.
The capabilities document is an XML response that details the supported image formats, projections, and map layers being served by that WMS.
The following is a WMS GetCapabilities request given to the same WMS used above:
http://suite.opengeo.org/geoserver/wms? SERVICE=WMS& VERSION=1.3.0& REQUEST=GetCapabilities
If you want, you can paste this request into a browser to see the result.
Boundless provides commercial open source software for internet mapping and geospatial application development. We are dedicated to the growth and support of open source software.
This work is licensed under a Creative Non Commercial-Commons Attribution-Share Alike 3.0 United States License. Feel free to use this material, but we ask that you please retain the Boundless branding, logos and style.