GetMap Requests
A GetMap request is the WMS request you’ll use to fetch a map for use in an SOS dataset. These requests contain a lot of parameters in their queries.
Parameters for the GetMap Request
Permalink to Parameters for the GetMap Request- version=1.3.0
- Specifies the version of the service you’re using. Sometimes parameters and response formats can change from version to version, so services allow you to request a specific version
- service=WMS
- Identifies this request as a WMS request
- REQUEST=GetMap
- REQUEST specifies the type of WMS request you’re making. In this case, it’s GetMap
- LAYERS=gebco_latest
- Tells the server which “layer” (which map) to return. This will vary depending on the map service you use, as they all offer different data
- CRS=EPSG:4326
- Defines the coordinate reference system. SOS requires CRS:84 or EPSG:4326
- FORMAT=image/png
- Defines the map’s format. In this case, we’re requesting the map as a jpeg (an image format)
- HEIGHT=600
- Defines the height of the image in pixels
- WIDTH=1200
- Defines the widht of the image in pixels
- TRANSPARENT=TRUE
- Sets the transparency of the map’s backgruond (this attribute is not present in the above example)
- BBOX=-90,-180,90,360
- Boundary box setting defines which piece of the map you’re looking at in degrees of latitude and longitude. For a world map, the coordinates shown above will show the complete map.
- STYLES=rgb
- Defines the “rendering style of the layer” (this attribute is not present in the above example)
How to use an Existing GetMap Request
Permalink to How to use an Existing GetMap RequestIf you have an existing GetMap request already, chances are you’ll have to check a few things and change a few others. The three changes that are required, minimum, are below:
- After the HEIGHT= parameter, change whatever number is there to <PIXELHEIGHT>, spelled and capitalized exactly like that
- After the WIDTH= parameter, change the number to <PIXELWIDTH>, spelled and capitalized exactly like that
- After the BBOX parameter, change whatever numbers are there to <WEST>,<SOUTH>,<EAST>,<NORTH>, spelled and capitalized exactly like that
These changes are required for the SOS system, but they won’t work in a browser, because the keywords such as <PIXELHEIGHT> were created by the SOS team, not the designers of WMS
You should also check a few of the parameters to make sure they’re compatible with the SOS format.
- CRS should equal CRS:84 or EPSG:4326. This parameter can’t be changed, so if it isn’t correct, you’ll need to find a different WMS server. If CRS= does not work, try SRS=
- FORMAT should equal image/png or image/jpg
If these parameters are correct, you’re good to go! See the How to Display WMS Data on the Sphere section to proceed.