1

I want to integrate GeoWebCache with GeoServer.

If a request( with a bbox say bbox-A) is cached in GWC.

Next,if a different user sends another request with a [bbox-A +- 0.00000001], will the cache be able to provide?

I believe that OpenLayers divides the screen area into a matrix (defined by image height, width) and makes a WMS request for each cell. Each request has a bbox parameter. If the GWC is seeded with a much larger area, It internally will be saving the tiles with a different bboxes. If there is a delta between the bbox of GWC and the request, will GWC be totally missed ?

1
  • you might want to read the WMTS Standard to get a feel for how this works
    – Ian Turton
    Feb 14, 2019 at 12:06

1 Answer 1

3

Have you already read https://www.geowebcache.org/docs/current/concepts/gridsets.html? The result of request bbox-A is not saved into cache but the tiles which intersects with bbox-A. In case of OpenLayers there is usuallly one-to-one relation because OL map is usually configured to make tiled 256x256 pixel request which suit with the tile limits of the gridset. GWC is using a tolerance when it evaluates if the BBOX of a WMS GetMap request hits the tile limits. The tolerance is perhaps 10% based on the error message that you can get with a WMS request that is intentionally made to be off

https://demo.geo-solutions.it/geoserver/gwc/service/wms?service=WMS&version=1.1.0&request=GetMap&layers=geosolutions:NaturalEarth&bbox=-124.73,24.95,-66.96,49.37&width=768&height=330&srs=EPSG%253A4326&format=image/png

400: Requested horizontal resolution: 0.22563114453125005 , best match: 0.17578125 exceeds 10% threshold. Perhaps the client is configured with an incorrect set of scales (resolutions), or the DPI setting is off compared to the one in GWC ?

For comparison a request that hits the tile limits. Adjust the BBOX and you can test yourself how much off it can be for being accepted.

If you have a local GeoServer and GWC installed you can play with the following URL. By adjusting the BBOX you can notice that small differences are accepted.

http://localhost:8080/geoserver/gwc/service/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&tiled=true&LAYERS=topp%3Astates&exceptions=application%2Fvnd.ogc.se_inimage&WIDTH=256&HEIGHT=256&SRS=EPSG%3A4326&STYLES=&BBOX=-95.625,36.5625,-92.8125,39.375

2
  • Each OL request has one to one mapping with a tile in GWC gridset. How does OL make sure that it's bbox is always in line with gridset ? Feb 18, 2019 at 9:41
  • OpenLayers knows everything about the gridset that is used when the map is configured dev.openlayers.org/docs/files/OpenLayers/Layer/Grid-js.html and it creates GetMap requests accodingly. OL is not intelligent but the one who configures OL must configure it to suit exactly with the gridset that is offered by the tile service. SingleTile mode is an exception because then OL creates only one request and BBOX equals to the extents of the whole visible map.
    – user30184
    Feb 18, 2019 at 10:29

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.