[GIS] Viewing GeoServer tile layers in QGIS through WMS

cacheqgiswms

I have an issue with viewing GeoServer 2.13-generated tile cache layers in QGIS 2.18.18 on Windows 10. The tile cache layers in GeoServer are being viewed in QGIS via an Add WMS/WMTS Connection, with a WMS connection URL of http://localhost:8080/geoserver/wms?tiled=true. GeoServer is configured with the Direct WMS Integration option selected, which allows WMS requests served through GeoServer to be cached as if they were received and processed by GeoWebCache. When viewing tiled layers from GeoServer with a URL like http://localhost:8080/geoserver/geospace/wms?tiled=true&service=WMS&version=1.1.0&request=GetMap&layers=geospace:Boulder_3857&styles=&bbox=-1.1722528E7,4858919.5,-1.1704111E7,4880837.0&width=1024&height=900&srs=EPSG:3857&format=application/openlayers, the performance is near-instantaneous, as you would expect. However, in QGIS, after adding a GeoServer tiled layer per the WMS connection URL of http://localhost:8080/geoserver/wms?tiled=true, a zoom to layer command takes way too long (~10 seconds for ~230K polygons) to bring up the initial view. After that zoomin/out commands are speedy, but whenever reverting back to the overall layer view the same delay is encountered.

Is this a function of how QGIS handles WMS tile layers? Is there a workaround to speed up the initial view?

Best Answer

You can go straight to the GeoWebCache URL, and that will be faster.

What might be happening is that you're requesting a non-tiled WMS rather than WMTS. GWC only has the tiled one, so it's more fool proof.

The URL is something like: http://localhost:8080/geoserver/gwc/service/wmts? and this should work in QGIS just fine.

Related Question