ERDDAP > wms > Documentation

ERDDAP's Web Map Service (WMS) lets you request an image with data plotted on a map. WMS (external link) is an Open Geospatial Consortium (OGC) (external link) and ISO (19128) (external link) standard for "the creation and display of registered and superimposed map-like views of information that come simultaneously from multiple remote and heterogeneous sources." See the list of datasets available via WMS at this ERDDAP installation.

Three Ways to Make Maps with WMS

  1. In theory, anyone can download, install, and use WMS client software.
    Some clients are: ArcGIS  (external link) and uDig  (external link). To make these work, you would install the software on your computer. Then, you would enter the URL of the WMS service into the client. For example, in ArcGIS (not yet fully working because it doesn't handle time!), use "Arc Catalog : Add Service : Arc Catalog Servers Folder : GIS Servers : Add WMS Server". In ERDDAP, each dataset has its own WMS service, which is located at
    https://cmgds.marine.usgs.gov/erddap/wms/datasetID/request?
    For example: https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?
    (Some WMS client programs don't want the ? at the end of that URL.) See the list of datasets available via WMS at this ERDDAP installation.

    In practice, we haven't found any WMS clients that properly handle dimensions other than longitude and latitude (e.g., time), a feature which is specified by the WMS specification and which is utilized by most datasets in ERDDAP's WMS servers. You may find that using a dataset's Make A Graph form and selecting the .kml file type (an OGC standard) to load images into Google Earth  (external link) provides a good (non-WMS) map client. See the list of datasets with Make A Graph at this ERDDAP installation.

  2. Web page authors can embed a WMS client in a web page.
    For example, ERDDAP uses Leaflet  (external link), which is a very versatile WMS client, for the WMS page for each ERDDAP dataset (like this). See the list of datasets available via WMS at this ERDDAP installation. Leaflet doesn't automatically deal with dimensions other than longitude and latitude (e.g., time), so you will have to write JavaScript (or other scripting code) to do that. (Adventurous JavaScript programmers can look at the Source Code from a web page like this.)

    Another commonly used JavaScript WMS client is OpenLayers  (external link).

  3. A person with a browser or a computer program can generate special WMS URLs.
    For example: See the list of datasets available via WMS at this ERDDAP installation.
    See the details below.

    In practice, it is easier, more versatile, and more efficient to use a dataset's Make A Graph web page than to use WMS for this purpose.
    See the list of datasets with Make A Graph at this ERDDAP installation.

Forming GetCapabilities URLs

A GetCapabilities request returns an XML document which provides background information about the service and basic information about all of the data available from this service. For this dataset, for WMS version 1.3.0, use
https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&request=GetCapabilities&version=1.3.0

The supported parameters for a GetCapabilities request are:

name=value* Description
service=WMS Required.
version=version Currently, ERDDAP's WMS supports "1.1.0", "1.1.1", and "1.3.0".
This parameter is optional. The default is "1.3.0".
request=GetCapabilities Required.
* Parameter names are case-insensitive.
Parameter values are case sensitive and must be percent encoded  (external link): all characters in query values other than A-Za-z0-9_-!.~'()* must be encoded as %HH, where HH is the 2 digit hexadecimal value of the character, for example, space becomes %20. Characters above #127 must be converted to UTF-8 bytes, then each UTF-8 byte must be percent encoded (ask a programmer for help). There are "websites that percent encode/decode for you  (external link).
The parameters may be in any order in the URL, separated by '&' .
 

Forming GetMap URLs

A person with a browser or a computer program can generate a special URL to request a map. The URL must be in the form
https://cmgds.marine.usgs.gov/erddap/wms/datasetID/request?query
The query for a WMS GetMap request consists of several parameterName=value, separated by '&'. For example,
https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&version=1.3.0&request=GetMap&bbox=-89.99,-179.99,89.99,180.0&time=2002-06-01T09:00:00Z&crs=EPSG:4326&width=360&height=180&bgcolor=0x808080&layers=Land,jplMURSST41:analysed_sst,Coastlines,Nations&styles=&format=image/png
The parameter options for the GetMap request are:
 
name=value* Description
service=WMS Required.
version=version Request version. Currently, ERDDAP's WMS supports "1.1.0", "1.1.1", and "1.3.0". Required.
request=GetMap Request name. Required.
layers=layer_list Comma-separated list of one or more map layers. Layers are drawn in the order they occur in the list. Currently in ERDDAP's WMS, the layer names from datasets are named datasetID : variableName . In ERDDAP's WMS, there are five layers not based on ERDDAP datasets:
  • "Land" may be drawn BEFORE (as an under layer) or AFTER (as a land mask) layers from grid datasets.
  • "Coastlines" usually should be drawn AFTER layers from grid datasets.
  • "LakesAndRivers" draws lakes and rivers. This usually should be drawn AFTER layers from grid datasets.
  • "Nations" draws national political boundaries. This usually should be drawn AFTER layers from grid datasets.
  • "States" draws state political boundaries. This usually should be drawn AFTER layers from grid datasets.
Required.
styles=style_list Comma-separated list of one rendering style per requested layer. Currently in ERDDAP's WMS, the only style offered for each layer is the default style, which is specified via "" (nothing). For example, if you request 3 layers, you can use "styles=,,". Or, even easier, you can request the default style for all layers via "styles=". Required.
1.1.0: srs=namespace:identifier
1.1.1: srs=namespace:identifier
1.3.0: crs=namespace:identifier
Coordinate reference system.
Currently in ERDDAP's WMS 1.1.0, the only valid SRS is EPSG:4326.
Currently in ERDDAP's WMS 1.1.1, the only valid SRS is EPSG:4326.
Currently in ERDDAP's WMS 1.3.0, the only valid CRS's are CRS:84 and EPSG:4326,
Required.
bbox=4commaSeparatedValues Bounding box corners in SRS/CRS units. For version=1.3.0 with CRS=EPSG:4326, the 4 values are: minLat,minLon,maxLat,maxLon. For all other situations, the 4 values are: minLon,minLat,maxLon,maxLat. (The reverse order! Yes, it's bizarre. Welcome to the world of OGC!) ERDDAP supports requests within the dataset's longitude (perhaps 0 to 360, perhaps -180 to 180) and latitude range. Most WMS clients assume longitude values are in the range -180 to 180. If ERDDAP offers a variant of a dataset with longitude -180 to 180, use it for WMS requests. Required.
width=output_width Width in pixels of map picture. Required.
height=output_height Height in pixels of map picture. Required.
format=output_format Output format of map. Currently in ERDDAP's WMS, only image/png is valid. Required.
transparent=TRUE|FALSE Background transparency of map. Optional (default=FALSE). If TRUE, any part of the image using the BGColor will be made transparent.
bgcolor=color_value Hexadecimal 0xRRGGBB color value for the background color. Optional (default=0xFFFFFF, white). If transparent=true, we recommend bgcolor=0x808080 (gray), since white is in some color palettes.
exceptions=exception_format The format for WMS exception responses. Optional.
Currently, ERDDAP's WMS 1.1.0 and 1.1.1 supports "application/vnd.ogc.se_xml" (the default),
"application/vnd.ogc.se_blank" (a blank image) and "application/vnd.ogc.se_inimage" (the error in an image).
Currently, ERDDAP's WMS 1.3.0 supports "XML" (the default), "BLANK" (a blank image), and
"INIMAGE" (the error in an image).
time=time Time value of layer desired, specified in ISO 8601 format: yyyy-MM-ddTHH:mm:ssZ . Currently in ERDDAP's WMS, you can only specify one time value per request.
In ERDDAP's WMS, the value nearest to the value you specify (if between min and max) will be used.
In ERDDAP's WMS, the default value is the last value in the dataset's 1D time array.
In ERDDAP's WMS, "current" is interpreted as the last available time (recent or not).
Optional (in ERDDAP's WMS, the default is the last value, whether it is recent or not).
elevation=elevation Elevation of layer desired. Currently in ERDDAP's WMS, you can only specify one elevation value per request.
In ERDDAP's WMS, this is used for the altitude or depth (converted to altitude) dimension (if any). (in meters, positive=up)
In ERDDAP's WMS, the value nearest to the value you specify (if between min and max) will be used.
Optional (in ERDDAP's WMS, the default value is the last value in the dataset's 1D altitude or depth array).
dim_name=value Value of other dimensions as appropriate. Currently in ERDDAP's WMS, you can only specify one value per dimension per request.
In ERDDAP's WMS, this is used for the non-time, non-altitude, non-depth dimensions.
The name of a dimension will be "dim_" plus the dataset's name for the dimension, for example "dim_model".
In ERDDAP's WMS, the value nearest to the value you specify (if between min and max) will be used.
Optional (in ERDDAP's WMS, the default value is the last value in the dimension's 1D array).
* Parameter names are case insensitive.
Parameter values are case sensitive and must be percent encoded  (external link): all characters in query values other than A-Za-z0-9_-!.~'()* must be encoded as %HH, where HH is the 2 digit hexadecimal value of the character, for example, space becomes %20. Characters above #127 must be converted to UTF-8 bytes, then each UTF-8 byte must be percent encoded (ask a programmer for help). There are websites that percent encode/decode for you  (external link).
The parameters may be in any order in the URL, separated by '&' .

(Revised from Table 8 of the WMS 1.3.0 specification)

Notes

Examples

ERDDAP is compatible with the current WMS 1.3.0 standard.

GetCapabilities https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&request=GetCapabilities&version=1.3.0
GetMap
(opaque)
https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&version=1.3.0&request=GetMap&bbox=-89.99,-179.99,89.99,180.0&time=2002-06-01T09:00:00Z&crs=EPSG:4326&width=360&height=180&bgcolor=0x808080&layers=Land,jplMURSST41:analysed_sst,Coastlines,Nations&styles=&format=image/png
GetMap
(transparent)
https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&version=1.3.0&request=GetMap&bbox=-89.99,-179.99,89.99,180.0&time=2002-06-01T09:00:00Z&crs=EPSG:4326&width=360&height=180&bgcolor=0x808080&layers=jplMURSST41:analysed_sst&styles=&format=image/png&transparent=TRUE
In Leaflet (external link) Demo (WMS 1.3.0)

 

ERDDAP is also compatible with the older WMS 1.1.1 standard, which may be needed when working with older client software.

GetCapabilities https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&request=GetCapabilities&version=1.1.1
GetMap
(opaque)
https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&version=1.1.1&request=GetMap&bbox=-179.99,-89.99,180.0,89.99&time=2002-06-01T09:00:00Z&srs=EPSG:4326&width=360&height=180&bgcolor=0x808080&layers=Land,jplMURSST41:analysed_sst,Coastlines,Nations&styles=&format=image/png
GetMap
(transparent)
https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&version=1.1.1&request=GetMap&bbox=-179.99,-89.99,180.0,89.99&time=2002-06-01T09:00:00Z&srs=EPSG:4326&width=360&height=180&bgcolor=0x808080&layers=jplMURSST41:analysed_sst&styles=&format=image/png&transparent=TRUE
In Leaflet (external link) Demo (WMS 1.1.1)

 

ERDDAP is also compatible with the older WMS 1.1.0 standard, which may be needed when working with older client software.

GetCapabilities https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&request=GetCapabilities&version=1.1.0
GetMap
(opaque)
https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&version=1.1.0&request=GetMap&bbox=-179.99,-89.99,180.0,89.99&time=2002-06-01T09:00:00Z&srs=EPSG:4326&width=360&height=180&bgcolor=0x808080&layers=Land,jplMURSST41:analysed_sst,Coastlines,Nations&styles=&format=image/png
GetMap
(transparent)
https://cmgds.marine.usgs.gov/erddap/wms/jplMURSST41/request?service=WMS&version=1.1.0&request=GetMap&bbox=-179.99,-89.99,180.0,89.99&time=2002-06-01T09:00:00Z&srs=EPSG:4326&width=360&height=180&bgcolor=0x808080&layers=jplMURSST41:analysed_sst&styles=&format=image/png&transparent=TRUE
In Leaflet (external link) Demo (WMS 1.1.0)