First up I've found several other posts on the same topic but neither seem to resolve my problem.

I am trying to create a geowebcache using the embedded geowebcache in Geoserver version 2.11.2

I have been working with two layers both have same problem. I've set the layers up in Geoserver using the extents computed from the SRS bounds. I have set up gridsets and seeded the tilecache. I can see this has been successful from the Tilecache preview in Geoserver.

If I then call the WMS from QGIS then the tile cache is not used (and is very slow as a result).

If I use curl to test the request using a URL I pulled from the layer preview in Geoserver I get the following result of misaglined grids:

geowebcache-cache-result:MISS geowebcache-miss-reason: request not aligned to grid(s) 'EPSG:27700'

The first layer I've worked with uses EPSG:27700

Gridset config is as follows: enter image description here

The curl request uses:

C:>"C:\Program Files\cURL\bin\curl" "http://host/geoserver/ws/wms?service=WMS&version=1.1.0&request=GetMap&layers=ws:Aerial%20Imagery%202016&styles=&bbox=383000.0,380999.999998459,400999.999998448,395999.999999761&width=768&height=640&srs=EPSG:27700&TILED=true&FORMAT=image%2Fjpeg" -w content_type -v >nul

The second layer is actually one of the sample layers and sample gridsets that come as part of the Geoserver. I've used this as test to exclude any variables I may have introduced. However I get the same result.

Layer users EPSG:4326

The Gridset is: enter image description here

The curl request is: C:>"C:\Program Files\cURL\bin\curl" "http://host/geoserver/nurc/wms?service=WMS&version=1.1.0&request=GetMap&layers=nurc:Img_Sample&styles=&bbox=-130.85168,20.7052,-62.0054,54.1141&width=768&height=372&srs=EPSG:4326&TILED=true&FORMAT=image%2Fjpeg" -w content_type -v>nul


It's easier to look at the second request, and it's clearly misaligned. In the 4326 gridset the longitude tile borders per zoom level are:

  • zoom level 0: -180, 0, 180 (180 degrees tile)
  • zoom level 1: -180, -90, 0, 90, 180 (90 degrees tiles)
  • zoom level 2: -180, -135, -45, 0, 45, 90, 135, 180 (45 degrees tiles)

Now you have there a request going from "-130.851" to "-62.0054"... it's a 68-ish degree tile that does not fit anywhere.

If you are using WMS from QGIS the likeliness of hitting a cached tile is basically zero, you should be using a tile oriented protocol like WMTS instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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