I have been following openlayers beginner'g guide for my webgis project. And I have a doubt : Suppose openlayers map client make a request of 'basic' type layer to wms server and which is to be displayed at all the zoom levels. So, at each zoom level different no. of tiles are produced and also with no loss of resolution of the image. So here my question is "in wms server, how are these images present???...does it produce tiles from a single high resolution image at our request or the tiles with different resolutions are presaved in the server?? I hope you understand my quesiton..thank you!
2 Answers
In a WMS the tiles are more or less pre saved on the server. You can of course calculate the tile-pyramid from one high resolution image, but these tiles are then saved to the server (as in a cached map service). I think for performance reasons the tiles are pre-rendered on the server, see example Bing Maps.
It would take way too much time to generate the tiles every request. If you have a high resolution raster image try using gdal2tiles to create your own tile pyramid for a TMS (Tile Map Service) and see how long this takes.

- 21,988
- 13
- 81
- 109

- 896
- 1
- 7
- 22
-
That's not correct. A WMS creates images per request. – user27874 Mar 12 '17 at 07:53
-
@user27874 This is correct, for example with Google Maps, they don't need to create images per request but cache them in memory for example and just return results for WMS GetMap requests. – Bằng Rikimaru Feb 12 '21 at 10:53
An OGC WMS (Web Map Service) is a service that provides maps on request from a client such as one built using OpenLayers. The data used as the source may be raster or vector or some combination. Whilst some WMS also provide caching, it is important to note that in a standard configuration a WMS generates the map sent on request. This is different from an OGC WMTS (Web Map Tile Service) or TMS.
The dynamic nature of a WMS can be seen in the response to a GetCapabilities request, like:
http://ogc.bgs.ac.uk/cgi-bin/BGS_BGS-HPA_Radon_Potential/wms?service=WMS&request=GetCapabilities&
Looking at sections of this we can see that:
You can request a number of map image formats
<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>
You can request layers in a number of different projections:
<CRS>CRS:84</CRS>
<CRS>EPSG:27700</CRS>
<CRS>EPSG:3034</CRS>
<CRS>EPSG:3413</CRS>
<CRS>EPSG:3857</CRS>
<CRS>EPSG:4258</CRS>
<CRS>EPSG:4326</CRS>
<CRS>EPSG:900913</CRS>
and also that you can change the default symbolization by supplying your own style through SLD:
<sld:UserDefinedSymbolization SupportSLD="1" UserLayer="0" UserStyle="1" RemoteWFS="0" InlineFeature="0" RemoteWCS="0"/>
Consider this example:
Through some client you request a map, the client generates a GetMap request like:
Gives:
In the client you click on some point location to get information on the data that created the map like:
From this you see that the underlying data (in this a case vector dataset, held in a database) has attribution that includes geological history values.
We want to know what other areas in the map are from the Triassic, so we create an SLD that colours the map according to a query, and send that SLD back to the server as part of a GetMap request like:
The generated SLD:
The complete GetMap request:
Gives:

- 312
- 3
- 20