Gridsets and Gridsubsets¶
Gridsets and gridsubsets refer to the spatial reference system of the layers served by GeoWebCache. By nature and as introduced in the Tiles, GeoWebCache is agnostic to reference-systems. When GeoWebCache makes a request to a WMS, it uses the gridset and gridsubset information to convert its internal tile index to a spatial request that the WMS will understand.
A gridset is a global definition (i.e. not layer-specific) specifying:
A spatial reference system (EPSG code)
A bounding box describing the extent, typically the maximum extent for the above reference system
One of either a list of scale denominators, resolutions, or zoom levels
The tile dimensions in pixels (constant for all zoom levels)
(Optional) Pixel size (to calculate scales). The default is 0.28mm/pixel, corresponding to 90.71428571428572 DPI.
A gridsubset is a layer-specific definition specifying:
The gridset for the layer
(Optional) The bounding box for that layer (which must be a subset of the extent of the gridSet)
(Optional) A list of zoom levels (which must be a subset of what is defined in the gridSet)
By default, this information is set in geowebcache.xml
.
From gridsets to tiles¶
Below there is the description for every zoom level of the interpretation process of the gridset and gridsubset at a particular zoom level and determining which tiles are being requested.
Corresponding XML¶
The example above could be implemented by the following configuration details, set in geowebcache.xml
.
<gridSet>
<name>testGridset</name>
<srs><number>4326</number></srs>
<extent>
<coords>
<double>-10.0</double>
<double>-30.0</double>
<double>85.0</double>
<double>21.0</double>
</coords>
</extent>
<alignTopLeft>false</alignTopLeft>
<resolutions>
<double>0.0879</double>
<double>0.04395</double>
<double>0.021975</double>
<double>0.0109875</double>
</resolutions>
<tileHeight>250</tileHeight>
<tileWidth>250</tileWidth>
</gridSet>
<wmsLayer>
<!-- Layer details -->
<gridSubset>
<gridSetName>testGridset</gridSetName>
<extent>
<coords>
<double>-14.0</double>
<double>-15.0</double>
<double>48.0</double>
<double>16.0</double>
</coords>
</extent>
</gridSubset>
<!-- More layer details -->
</wmsLayer>