3

I'm new to QGIS and work on an air-gapped system where I have access only to QGIS 2.14.9-Essen. I create a WMS layer, which "works" but performance is abysmal. So I enable caching (Settings > Network) with a large disk space.

If I simply pan back and forth by a very small amount (1-2 pixels), I expect it to use the cached files. Instead it apparently fetches new files on each pan, as indicated by the progress bar and a half-second delay. The number of files in the cache area continues to grow with each micro-pan. QGIS is caching ever-more tiles but never using them.

It might help if I understood the file structure. Under the cache area, QGIS created sub-directories data1-data8, and the cached tiles are distributed among those sub-directories, with filenames like .../cache/data6/i8duj3mh.d. What is a *.d file and why the sub-directories?

  • Can you elaborate on how (and why) you're using a Web Map Service layer on an air-gapped computer? I wonder if a regular raster with pyramids might work better. – csk Apr 15 at 17:17
  • I should have said air-gapped network. I have access to a WMS server on the network. I think this detail is irrelevant to my caching problems, I was just explaining why I can't upgrade to a newer version. – mark78 Apr 17 at 5:16
  • I think I see what you're saying now. I'm using WMS, but WMTS would be better. If I open a cached *.d file in a text editor, it includes the request, and I can see I'm getting the whole image on each request instead of tiles. I do have access to a tile server that can handle requests like myserver/{z}/{y}/{x}, but I haven't been able to access it from QGIS so far. – mark78 Apr 17 at 6:13
  • I see a lot of questions like "why isn't my raster layer working?" and then it turns out they actually have a WMS layer or an XYZ tile server layer, not a raster. So we waste a lot of time trying to solve the question they asked, when the actual problem is quite different. In contrast, your question seems to be exactly the right question for your situation. Apologies. Unfortunately I don't know the answer. It might be worthwhile to look at the QGIS issue tracker (filter to QGIS version 2.14) to see if there was a bug in the tile caching in that version. – csk Apr 17 at 15:58
  • The QGIS issue tracker is here: issues.qgis.org/projects/qgis/issues. Also attempting to get the tile server layers working seems like a good idea. I've seen some debate about whether it's possible to use local tiles in QGIS. Have a look at this question (including the comments): gis.stackexchange.com/q/219035/81764. Not sure if that issue was resolved, and whether it's relevant when the tiles are on a local network as opposed to on your hard drive. – csk Apr 17 at 16:09

Your Answer

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

Browse other questions tagged or ask your own question.