87

What is the main difference between a Web Map Tile Service (WMTS) and a Web Map Service (WMS)?

When should you choose one over the other?

What are the (dis)advantages by choosing one over the other?

I have read the Wikipedia entries.

2 Answers 2

95

The WMS standard allows the client to request an arbitrary region. If the client wants tiles, it can makes its requests in a tiled pattern, but the server has no way to know that's what's happening and if the server stores the map as tiles of its own, it has no way to let the client know what the tile arrangement is.

There are two ways to deal with this. One is to extend the WMS protocol with extra information so that a compliant client can send requests that line up correctly. This was termed WMS-C.

The other is an entirely new protocol that is specifically designed for tiles. In particular it uses integer indices for the tiles rather than requiring the client to request a bounding box that aligns with a particular grid. The first widely supported protocol doing this was TMS. There are also many one off ad hoc solutions.

Eventually the OGC, who came up with the original WMS spec, decided to make a tile protocol and the result was WMTS. It's like TMS in that is tile oriented with integer indices, but it also supports some additional features from WMS that TMS lacks such as Dimensions and GetFeatureInfo. It's also much more complicated than TMS.

Pre-rendered tiles can be served up using any of the three protocols and there are tile servers that support all three, some acting as caching proxies in front of conventional WMS servers (As in the common pairing of GeoServer and GeoWebCache)

WMS-C and TMS are mature but less official in some people's minds since they aren't OGC specs. WMS-C is also a bit of a kludge while TMS lacks some useful but peripheral features. WMTS has the backing of the OGC and combines the tile specific design of TMS with the extra features of WMS, but it's complex and its implementations tend to be less mature than those of the other two as it's more recent.

Besides allowing for cached/pre-rendered tiles, tiling also allows for smoother panning on a slippy map. On the down side, it can result in clipped or missing symbols at tile boundaries, and labels duplicated for tile spanning features. Heatmaps and similar interpolations may also break across tiles depending on the implementation. If the server knows the request is being used as a tile, then it can mitigate those rendering problems using techniques like gutters or meta-tiles.

WMS also allows for the user to dynamically change the map styling by sending a request with SLD included either directly or by reference.

4
  • 3
    4 years later, would you say that WMTS service implementations are as mature now?
    – jpmc26
    Commented Jul 30, 2018 at 17:17
  • 6
    @jpmc26 I certainly recommend that people use WMTS with GeoWebCache these days and we switched GWC's internal demo page (which used OpenLayers) from WMS-C to WMTS. Of course to some people the new way will always be the new and untrusted way no matter how long its been. For others it the old and clunky way and should be dismissed in favour of whatever MapBox is doing this week.
    – smithkm
    Commented Jul 30, 2018 at 22:01
  • 1
    What MapBox is doing (vector tiles) can be delivered through a WMS. A WMS is useful over a WMTS if you want to query it (using SLD) or resymbolize it (SLD again).
    – nmtoken
    Commented Jan 9, 2020 at 23:26
  • 1
    @nmtoken If you really want to, you can pass through filters or custom SLD with WMTS the same as WMS (In GWC you'll need to set up parameter filters either way) It's not a particularly good idea to do this with a tile cache regardless of the protocol though.
    – smithkm
    Commented Feb 6, 2020 at 20:11
63

A WMTS delivers tiles (mostly 256x256 pixel size), while WMS delivers one image per request.

Main advantage of tiles is that they can be pre-renderd on the server side, and cached on the client side. This will reduce waiting time for the data and bandwith. On the other hand, you need lots of Gigabytes if you want to pre-render the whole world. Most of it will contain only water.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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