A Web Mapping Service (WMS) is a service providing map data online for the use of other sites and applications. The data service may be free, or have a charge. The idea, which is slow in coming to fruition but which is still being pushed by companies such as ESRI (example), is that people will string together data, analysis, and visualisation by combining a variety of Web Services, each with a small charge. This moves the industry from an expensive up-front cost to a more consistent rental model, a model the industry would prefer, especially given the drive to Open Source software. Of course, as it turns out, some of those services are being offered for free as well.
Good starting points for open data include:
Web Mapping Services are traditionally centred around the WMS standard, defined by the Open Geospatial Consortium (OGC), but other associated standards exist, such as the Web Feature Service standard for individual geographical features. In fact, the XML-heavy WMS standard proves relatively slow in practice, so many companies have opted for a slightly more modern and faster standard, the Web Map Tile Service (see this blog post by Sophia Parafina). There are a number of WMS and WMTS-compliant map servers including some of the OpenStreetMap servers (see below), and servers from commercial companies include MapBox and ESRI. There is also more specialised information such as data from NASA or the British Geological Survey. Such data can usually be added to web maps, but can also be imported into standard GIS (Info for: OpenStreetMap; MapBox; ArcMap; ArcCatalog).
You can add maps from such services directly to online maps using libraries like Leaflet (info), and there is an example of doing that in our Leaflet materials. However, you can also get direct geographical information from some servers, as well as other kinds of service. As a practical example of what WMS looks like, let's run the simplest direct WMS querying, which is to get the capabilities of the service.
WMS defines a number of HTTP requests and what the response should be. One of the
foundational requests of a WMS-compliant map server is GetCapabilities
.
According to the WMS standard, the GetCapabilities
request should be
sent with specific information, such as that illustrated below for querying a server running on your
local machine
(see here for source):
server=http://localhost:8080/geoserver/wms
service=wms
version=1.1.1
request=GetCapabilities
Such a request can be issued directly with a HTTP GET request, i.e. encapsulated within a URL.
Try and construct a URL that polls the WORLD OpenStreetMap WMS server for its capacities. The web address for WMS queries is http://129.206.228.72/cached/osm
. Remember that the format for an
HTTP GET request is:
http://server?name1=value1&name2=value2&name3=value3
(Though the order of the variables named doesn't matter)
Try and issue the HTTP GET request by browsing the URL with a web browser. If you are successful, you should get back an XML file you can open in Notepad++ or equvalent. You can find out more about issuing WMS requests to
OpenStreetMap on this info page. Try also looking up GetCapabilities
in the formal
WMS standards document.