Skip to main content
v2026.11,986 entries · CC-BY 4.0

Web Map Service (WMS): Requests, Parameters and Axis Order

What a Web Map Service (WMS) is, the GetMap parameters, a decoded request with the pixel arithmetic, and the WMS 1.1.1 versus 1.3.0 axis-order trap.

Written and maintained by CASRAI Editorial Board

Published

On this page

A Web Map Service (WMS) is an Open Geospatial Consortium (OGC) standard that lets a client request a map as a ready-made image, such as a PNG or JPEG, over a simple HTTP interface from one or more distributed geospatial databases. The client sends a URL with parameters (which layers, which area, what image size) and the server answers with a picture, not with the underlying data. The standard is published as OGC 06-042, version 1.3.0, and the OGC states that WMS 1.3 and ISO 19128 are the same document.

What is a Web Map Service (WMS)?

The OGC lists the standard as the “OpenGIS Web Map Service (WMS) Implementation Specification”, document 06-042, an implementation standard at version 1.3.0 (OGC WMS standard page). The OSGeo overview describes the service as a simple HTTP interface for requesting geo-registered map images, delivered in formats such as JPEG and PNG, and notes that it is implemented in hundreds of products (OSGeo WMS overview).

The practical consequence is that a WMS is a rendering service. It is the right interface when a researcher, a portal or a web map needs to display a layer that someone else maintains: land cover, boundaries, imagery, hazard zones. When the analysis needs the vector features or raster values themselves, a WMS image is not enough, and other OGC services exist for that. The web mapping guide compares WMS with WMTS and the other service types; this page concentrates on what a WMS request looks like and how to read it. The OGC itself is covered in our Open Geospatial Consortium guide, and public WMS endpoints are usually advertised through a geoportal.

The three WMS operations: GetCapabilities, GetMap and GetFeatureInfo

A WMS defines three operations. According to the OSGeo overview, GetCapabilities and GetMap are required and GetFeatureInfo is optional.

  • GetCapabilities returns service-level metadata. It is the first request to make to an unfamiliar server, because the response describes what the server offers. GeoServer’s reference lists three parameters for it: service=WMS, version and request=GetCapabilities.
  • GetMap returns the map image for a requested area, set of layers and image size.
  • GetFeatureInfo returns information about the features at a pixel position on a map previously requested with GetMap. In GeoServer it takes all of the GetMap parameters plus query_layers and a pixel position.

Every request is a plain HTTP GET with key-value pairs, which is why a WMS can be tested by pasting a URL into a browser.

GetMap parameters explained

GeoServer’s WMS reference lists the GetMap parameters that must be present: service, version, request, layers, styles, the coordinate system key, bbox, width, height and format. The data table below sets out every GetMap, GetFeatureInfo and GetCapabilities parameter named in that reference, with its status and default. Three of them cause most of the errors:

  • layers is a comma-separated list of layer names, and styles is a comma-separated list of style names in the same order. An empty styles value selects the default style of each layer.
  • bbox is written minx,miny,maxx,maxy in the units of the coordinate reference system. It defines the area of the map, not the size of the picture.
  • width and height are the size of the returned image in pixels. They set the resolution of the picture; they do not change which area is shown.

The coordinate system key is srs in WMS 1.1.1 and crs in WMS 1.3.0, and the pixel position for GetFeatureInfo is x and y in 1.1.1 but i and j in 1.3.0.

Worked example: decoding a GetMap request

The GeoServer reference gives this sample WMS 1.1.1 request against a local server (the layer is topp:states, a sample layer shipped with GeoServer):

http://localhost:8080/geoserver/wms?request=GetMap&service=WMS&version=1.1.1&layers=topp%3Astates&styles=population&srs=EPSG%3A4326&bbox=-145.15104058007,21.731919794922,-57.154894212888,58.961058642578&width=780&height=330&format=image%2Fpng

Reading it in order: the server is asked for the layer topp:states (the %3A is a URL-encoded colon) drawn in the style population, in the geographic coordinate system EPSG:4326, as a 780 by 330 pixel PNG (image%2Fpng is image/png). The requested area runs from longitude -145.151 to -57.155 and from latitude 21.732 to 58.961.

A useful check is whether the pixel shape matches the map shape. The arithmetic for this request:

  • BBOX width: -57.154894212888 – (-145.15104058007) = 87.996146 degrees of longitude.
  • BBOX height: 58.961058642578 – 21.731919794922 = 37.229139 degrees of latitude.
  • Aspect ratio of the area: 87.996146 / 37.229139 = 2.363636.
  • Aspect ratio of the image: 780 / 330 = 2.363636.
  • Resolution: 87.996146 / 780 = 0.112816 degrees per pixel horizontally, and 37.229139 / 330 = 0.112816 degrees per pixel vertically.

The two ratios are identical, so one pixel covers the same number of degrees in both directions and the picture is not stretched. When the ratio of width to height differs from the ratio of the BBOX sides, a server may stretch the map to fit, so deriving height from width and the BBOX is good practice. This is the editorial reading of the arithmetic; the reference itself only lists the parameters.

WMS 1.1.1 versus 1.3.0: the axis order trap

The same area can need two different BBOX strings. The GeoServer WMS basics page states that WMS 1.1 always uses east/north (longitude, latitude) axis ordering, whereas WMS 1.3.0 uses the axis order of the coordinate system, which for EPSG:4326 is latitude/longitude. For the whole world, GeoServer’s examples are:

Version CRS key and value BBOX for the whole world
1.1.1 SRS=epsg:4326 BBOX=-180,-90,180,90
1.3.0 CRS=epsg:4326 BBOX=-90,-180,90,180

If a layer renders in the wrong place, as an empty image, or as a thin strip, check this before anything else. Sending a 1.1.1 style BBOX with version=1.3.0 and EPSG:4326 swaps latitude and longitude, so the server reads a different area from the one intended.

Common mistakes with WMS requests

  • Mixing version keys. Using srs, x and y in a 1.3.0 request, or crs, i and j in a 1.1.1 request. Match the keys to the version value.
  • Reversing the BBOX for 1.3.0. See the table above.
  • Leaving out styles. The parameter is required; send it empty (styles=) to accept each layer’s default style.
  • Treating the image as data. A WMS returns pixels drawn by the server’s styling. Colours in the image are not measured values, and the map cannot be re-styled client-side unless the server supports the optional styling parameters (GeoServer lists sld and sld_body).
  • Ignoring the error format. By default GeoServer returns errors as application/vnd.ogc.se_xml; if an image is expected and XML arrives, read the XML. Other options are se_inimage and se_blank.
  • Transparent overlays. transparent defaults to false and bgcolor to FFFFFF (white), so an overlay on another map needs transparent=true and a format that supports transparency, such as PNG.

How to request a WMS map with curl, Python or R

These snippets build the request from the worked example. The host https://example.org/geoserver/wms is a placeholder: substitute the address of the WMS you are using, which GetCapabilities confirms.

curl

curl -G "https://example.org/geoserver/wms" 
  --data-urlencode "service=WMS" --data-urlencode "version=1.1.1" 
  --data-urlencode "request=GetMap" --data-urlencode "layers=topp:states" 
  --data-urlencode "styles=population" --data-urlencode "srs=EPSG:4326" 
  --data-urlencode "bbox=-145.15104058007,21.731919794922,-57.154894212888,58.961058642578" 
  --data-urlencode "width=780" --data-urlencode "height=330" 
  --data-urlencode "format=image/png" -o states.png

Python (standard library)

from urllib.parse import urlencode
from urllib.request import urlretrieve

params = {
    "service": "WMS", "version": "1.1.1", "request": "GetMap",
    "layers": "topp:states", "styles": "population", "srs": "EPSG:4326",
    "bbox": "-145.15104058007,21.731919794922,-57.154894212888,58.961058642578",
    "width": 780, "height": 330, "format": "image/png",
}
url = "https://example.org/geoserver/wms?" + urlencode(params)
urlretrieve(url, "states.png")

The urlencode call produces the same encoded query as the sample URL (topp%3Astates, EPSG%3A4326, image%2Fpng).

R (base)

q = c(service = "WMS", version = "1.1.1", request = "GetMap",
       layers = "topp:states", styles = "population", srs = "EPSG:4326",
       bbox = "-145.15104058007,21.731919794922,-57.154894212888,58.961058642578",
       width = "780", height = "330", format = "image/png")
url = paste0("https://example.org/geoserver/wms?",
             paste(names(q), vapply(q, URLencode, "", reserved = TRUE),
                   sep = "=", collapse = "&"))
download.file(url, "states.png", mode = "wb")

When a WMS is and is not the right tool

A WMS fits display: the server does the cartography and the client receives a picture. It does not deliver the raw data behind that picture. For analysis, pair it with the guidance in spatial data analysis, and when a map image has to be aligned to coordinates yourself, see georeferencing in QGIS. The OSGeo overview also lists layer queries (GetFeatureInfo) as the optional route from a picture back to feature attributes.

Sources

Data: WMS request parameters by operation, as documented for GeoServer

Compilation of the Web Map Service request parameters named in the GeoServer WMS reference for GetCapabilities, GetMap and GetFeatureInfo, with their required or optional status, defaults and the WMS 1.1.1 versus 1.3.0 key differences. Compiled from the GeoServer WMS reference and cross-checked against the OSGeo WMS overview for the operation list.

WMS request parameters by operation, as documented for GeoServer
ParameterOperationStatusValue rule or default
serviceAll three operationsRequiredValue WMS
versionAll three operationsRequiredProtocol version, for example 1.1.1 or 1.3.0
requestAll three operationsRequiredGetCapabilities, GetMap or GetFeatureInfo
layersGetMapRequiredComma-separated list of layer names
stylesGetMapRequiredComma-separated list of styles; empty selects the default style
srs (1.1.1) or crs (1.3.0)GetMapRequiredCoordinate reference system, for example EPSG:4326
bboxGetMapRequiredminx,miny,maxx,maxy in units of the coordinate reference system
widthGetMapRequiredImage width in pixels
heightGetMapRequiredImage height in pixels
formatGetMapRequiredImage format, for example image/png
transparentGetMapOptionalDefault false
bgcolorGetMapOptionalRRGGBB colour, default FFFFFF
exceptionsGetMapOptionalDefault application/vnd.ogc.se_xml; also se_inimage and se_blank
timeGetMapOptionalOptional time selection
sld, sld_bodyGetMapOptionalStyled layer descriptor supplied by reference or inline
query_layersGetFeatureInfoRequiredLayers to query, in addition to the GetMap parameters
x, y (1.1.1) or i, j (1.3.0)GetFeatureInfoRequiredPixel position on the map image
info_formatGetFeatureInfoOptionalDefault TEXT; also GML2, GML3, HTML, JSON, JSONP
feature_countGetFeatureInfoOptionalDefault 1

Sources

Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · full access

Ask about Web Map Service (WMS): Requests, Parameters and Axis Order

Full access: large monthly usage, up to 10 source passages behind each answer, and MCP and API access for Claude Code, Codex and other CLIs. Cancel any time.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →