What is the Difference between WMTS and WMS
WMS (Web Map Service)
WMS (Web Map Service) is a standard protocol for serving geospatial data as images (e.g., PNG, JPEG) over the web. It allows clients to request maps and map layers from a server and display them on a map viewer or client application.
WMTS (Web Map Tile Service)
WMTS (Web Map Tile Service) is a standard protocol for serving pre-rendered map tiles over the web. It allows clients to request map tiles from a server and display them on a map viewer or client application. Map tiles are small, fixed-sized images that are used to display a map at a specific scale and location. By requesting and displaying map tiles rather than a full map image, a client can display a large area of the map with less data transfer and faster rendering.
So what is the difference between WMS and WMTS?
The main difference between WMS and WMTS is the way in which the map data is served to the client. WMS serves map data as a single image which is rendered on an ad hoc bases, while WMTS serves map data as a set of tiles.
This can make WMTS more efficient for displaying large areas of the map, especially at high zoom levels, but it can also make it less flexible, as the available map scales and projections are limited to those that have been pre-rendered as tiles.
Here are a few examples of API calls to a WMS (Web Map Service) and a WMTS (Web Map Tile Service) that illustrate some of the differences between the two APIs:
WMS API call:
curl "https://wms.example.com/maps?service=WMS&version=1.3.0&request=GetMap&layers=landcover&bbox=-180,-90,180,90&width=600&height=400&format=image/png&crs=EPSG:4326" > map.png
In this example, the
service parameter specifies that the request is for a WMS service, the
version parameter specifies the version of the WMS service, and the
request parameter specifies that the request is a
GetMap request. The
crs parameters specify the details of the map image being requested. The response will be a single image file in the specified format.
WMTS API call:
curl "https://wmts.example.com/tiles/landcover/EPSG:4326/5/15/10.png" > tile.png
In this example, the
tiles endpoint specifies that the request is for a WMTS service, and the path parameters specify the layer, CRS, zoom level, and tile coordinates of the tile being requested. The response will be a single image file in the specified format.
Some of the main differences between these two API calls are:
versionparameters are specific to the WMS API and are not used in the WMTS API.
requestparameter is used in the WMS API to specify
Both WMS and WMTS are widely used protocols for serving geospatial data over the web, and they both have their own strengths and limitations. Which one is more suitable for a particular application will depend on the specific requirements and use cases of that application.