0

I am trying to understand the WMS service in MapServer. What I've done so far is making a complete map with a roads network some buildings and parks. Then I create an HTML template and by calling the url I get my map. My question is: is this map considered a WMS service? This confuses me because I came across this http://mapserver.org/ogc/wms_server.html that explains how to set up a WMS server and so I set it up and now I can call fot the GetCapabilities and GetMap requests. So, this confuses me. Various resources on the internet refer to a simple map as a WMS. On the other hand, the link refers to the WMS as something a bit more different. Eventually what is the difference?

  • 1
    If you get a map with GetMap request and GetCapabilities work then it feels like WMS. If you fetch your map with mode=map or some other MapServer specific call then it is not WMS. It is possible to get both from the same mapfile, though. – user30184 Jan 16 '17 at 16:49
  • Thank you very much. Can I also create a caching service for a map I'm creating? For example this map I'm mentioning above is it helpful to cache it with mapcache for example ? – Stefanos Jan 16 '17 at 19:05
  • You can use MapCache for caching WMS sources as documented in mapserver.org/mapcache/config.html – user30184 Jan 16 '17 at 19:14
  • Won't caching work in CGI mode? Is it only working in WMS service ? – Stefanos Jan 16 '17 at 19:15
  • Caching itself works but for MapCache (read the manual) "There are currently no sources other than WMS implemented, though others may be added later if the need arises". MapProxy probably can cache CGI directly, But activating WMS means only adding a few lines into the mapfile. – user30184 Jan 16 '17 at 19:23
2

An OGC Web Map Service (WMS) is any service that conforms to the (well any version of the) OGC WMS standard. The current version is WMS 1.3.0, though the previous version (WMS 1.1.1) is also widely used. Other versions exist but aren't commonly used.

At its simplest a service is deemed to be a WMS if supports two operations:

  1. GetCapabilities
  2. GetMap

Other operations exist such as:

  • GetFeatureInfo

And when combined with the Styled Layer Descriptor (SLD) specification:

  • GetLegendGraphic
  • DescribeLayer
  • GetStyles

A GetCapabilities is as you say an XML response to a request like:

http://myservice/ows?service=WMS&request=GetCapabilities& ~ which should return the highest version of the WMS standard supported by your service

or a request like:

http://myservice/ows?service=WMS&request=GetCapabilities&version=1.1.1& ~ which should return a version 1.1.1 response for your service, if your service supports it...

The GetCapabilities response lets a client know all the operations supported by your service, the names of the layers, the coordinate reference system(s), and the extent, the link to metadata, feature data sets, and other datasets, the geographic extents of your layers, etc, etc.

A GetMap response is an image, it isn't just limited to gif/jpeg, the following image formats are supported in one MapServer service I know of... (as advertised in the GetCapabilities response)

<GetMap>
    <Format>image/png</Format>
    <Format>image/jpeg</Format>
    <Format>image/png; mode=8bit</Format>
    <Format>application/x-pdf</Format>
    <Format>image/svg+xml</Format>
    <Format>image/tiff</Format>
    <Format>application/vnd.google-earth.kml+xml</Format>
    <Format>application/vnd.google-earth.kmz</Format>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.