A GetCapabilities request will return an XML (Extensible Markup Language) document. If you aren’t familiar with markup languages, you can find more information on them here: http://en.wikipedia.org/wiki/Markup_language.
However, all you really need to know is that markup languages organize information by enclosing it with tags that describe what type of information it is. For example, to designate a title, an XML document will have the Title tags enclosing the actual title, like this:
<TITLE>Title of Map</TITLE>
Tags have an opening tag and a closing tag — the closing tag has a backslash in front of the word, inside the brackets.
How to Find Relevant Information in a GetCapabilities RequestPermalink to How to Find Relevant Information in a GetCapabilities Request
The information you need from a GetCapabilities request is the name of the map
layer, the CRS, and the formats available. To find the layer, you need to look
<Layer> tag, followed by a
<Name> tag instead of a
Layers don’t always contain maps; sometimes they contain metadata about the map
instead. Usually, layers with maps will have the
<Layer> tag, like this:
You might not be able to determine which layer you want at first sight, just by
looking at the tags containing information about the layer — in that case,
simply try them out until you find one. See the next section for an explanation
of how to do so. Similarly, to find the CRS, look for the tag
<CRS>, and to
find the format of a particular server, search for
<Format>. As long as there
is a format tag that contains the words
image/png, SOS can use
the map. However, the CRS must be CRS:84. You can do a simple word search in
Windows by pressing Ctrl + F,
which will bring up a little search box. Type in the tag you’re looking for,
then use the up and down arrow keys to find multiple occurrences of your search
How to Create a GetMap RequestPermalink to How to Create a GetMap Request
Once you’ve found the necessary information in the GetCapabilities page, you can start constructing your GetMap request. You’ll want to test your request in your browser before trying to put it onto the sphere, but some formats will have to be changed, as explained later. To make the request, keep everything up to the word GetCapabilities in your previous GetCapabilities request, then replace the word GetCapabilities with GetMap. This will change the request type. If you don’t already have parameters after your request, you’ll need to create them now, or modify them if you do have them. The parameters you need to create an SOS-ready WMS request are below.
If SOS requires a particular value, it has been filled in — however, not all of SOS’s requirements can be used in a browser. The keywords <IMAGE_HEIGHT>, <IMAGE_WIDTH>, and <BOUNDING_BOX> are in brackets not because they are XML tags, but because the SOS team (who created them) gave them that format to distinguish them from ordinary WMS parameters. The SOS software is the only thing that recognizes them. If you use them in a browser, you’ll get an error. Instead, fill in 1800 for HEIGHT and 3600 for WIDTH, and -180,-90,180,90 for BBOX if you’re testing your map in a browser.
- LAYERS equals the layer name you found using GetCapabilities
- FORMAT=image/png or FORMAT=image/jpg
- TRANSPARENT can equal TRUE or FALSE
- STYLES usually equals rgb
Separate the parameters with & signs. Please note that spelling and capitalization have to be exactly as shown here. When you’re done, your request should look something like this for a browser: http://neowms.sci.gsfc.nasa.gov/wms/wms?version=1.3.0&service=WMS&REQUEST=GetMap&LAYERS=MODAL2_D_CLD_CI&CRS=CRS:84&FORMAT=image/png&HEIGHT=1800&WIDTH=3600&TRANSPARENT=TRUE&BBOX=-180.0,-90.0,180.0,90.0&STYLES=rgb.
And something like this for SOS:
BBOX have been changed.