[GIS] ArcGIS Desktop from GetCapabilities to GetMap

arcgis-desktopwms

When making a GetCapabilities request from ArcGis Desktop, how does it get the information needed for making the GetMap request and how is the GetMap request handled by their "sample server"?

For example (taken from their own resource center http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005300000046000000):

If I use their own sample server and make the following GetCapabilities request:
http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?version=1.3.0&request=GetCapabilities&service=WMS

But how does it get the information needed for making the following GetMap request?:
http:/sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?version=1.3.0&request=GetMap&CRS=CRS:84&bbox=-178.217598,18.924782,-66.969271,71.406235&width=760&height=360&layers=0&styles=default&format=image/png

Is it only taken from the GetCapabilities response XML or am I missing something here? It's difficult for me to understand how ArcGis Desktop creates the GetMap request and receives the images when I'm only inputting the GetCapabilities request. Is there some documentation I'm missing somewhere? And is there some kind of guideline as to how their "sample server" might be handling the incoming requests?

Best Answer

GetMap URL is automatically built using the response of GetCapabilities.

Here you see, where do GetMap parameteres come from in the GetCapabilities Xml Document:

  • CRS=CRS:84 => This is the coordinate system of all layers. Just try to search the xml file for CRS:84.
  • bbox=-178.217598,18.924782,-66.969271,71.406235 => Search for EX_GeographicBoundingBox in xml and you will see the bounding box of all layers and bounding box of each layer separately.
  • width=760&height=360 = > just search for MaxWidth or MaxHeight and you will see two numbers. You can specify any number less than or equal to these numbers
  • layers=0 => Look for the tags Layer. In your sample GetCapabilities xml, there a group layer at top, with 3 layers underneath that layer. You can query each layer with their numbers. valid values are 0,1,2
  • styles=default => look for style in the GetCapabilities xml

  • format=image/png => look for format in the GetCapabilities xml

All WMS (web mapping service) services support GetMap request by default, if you haven't disabled it, you can use the same server url but with different request parameter. Pay attention to your both URLs. They are exactly the same until the request part:

http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?version=1.3.0

From here you can set the request parameter to either GetCapabilities or GetMap. For example:

http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?version=1.3.0&request=GetMap

Related Question