My unpublished android app happily maps Land Information New Zealand vector property boundaries above a backdrop of aerial photographs.

It directly obtains the individual tiles from LINZ using HTTP GET - for example:


Vector map data may be exported to shape files. To give my future users a desktop experience I recommend they load their shape files into QGIS then add aerial photographs as a WMTS layer using the following URL:


This works well. The problem is that it works too well! [It's assembling the raster backdrop more quickly than my app.]

I investigated further:
(1) Start a WireShark ip trace
(2) Access the above 'Z/X/Y.png' URL from my browser [to prove the trace]
(3) Clear the QGIS WMTS cache.
(4) Open the QGIS project containing the above WMTS layer.
(5) Snap the trace result (image is below)

The only HTTP GET request I see is the one manually issued by my browser.

How is QGIS retrieving the raster backdrop?

Is it inhaling the tiles individually via HTTP GET protocol (in which case Wireshark misses them) or by some other TCP/IP protocol that I have no experience of?



The OpenGIS Web Map Tile Service Implementation Standard defines the protocol as

The encoding of procedure oriented architectural style operation requests performed over HTTP SHALL use HTTP GET with KVP encoding or HTTP POST with KVP or SOAP encoding as specified in clause 11 of OWS Common.

So for sure QGIS is sending GetTile requests through HTTP.

Here is a request that is captured with Fiddler

GET https://tiles-a.data-cdn.linz.govt.nz/services;key=my_key/tiles/v4/set=2,style=auto/EPSG:3857/9/506/318.png HTTP/1.1 

User-Agent: Mozilla/5.0 QGIS/2.18.10 
Connection: Keep-Alive 
Accept-Encoding: gzip 
Accept-Language: en,* 
Host: tiles-a.data-cdn.linz.govt.nz

And this is the beginning of the response

HTTP/1.1 200 OK
Content-Type: image/png
X-Powered-By: Express
Cache-Control: public, max-age=3600
Server: Koordinates
Access-Control-Allow-Origin: *
Content-Length: 58005
Accept-Ranges: bytes
Date: Sun, 06 Aug 2017 11:11:07 GMT
Via: 1.1 varnish
Age: 0
Connection: keep-alive
X-Served-By: cache-bma7034-BMA
X-Cache: MISS
X-Cache-Hits: 0


Thus the answer to your question is:

QGIS is inhaling the tiles individually via HTTP GET protocol but your Wireshark misses them.

  • A perfect, self-proving answer! It refers to this Standard and there's no arguing with the Trace. – Bad Loser Aug 6 '17 at 22:16
  • Epilog: I attempted the trace with Fiddler because of the excellent results obtained by @user30184. Interestingly, I obtained the same negative results as I did with Wireshark. Yet examination of the QGIS cache reveals that the tiles ARE being retrieved. Any ideas that might save me opening a new question would be greatly appreciated. – Bad Loser Aug 7 '17 at 0:01
  • Maybe a problem in configuring QGIS to use Fiddler as a proxy. – user30184 Aug 7 '17 at 4:26
  • 1
    Yes - but 2 things needed in all. To trace successfully: (1) QGIS/Settings/Options/Network/Use Proxy/DefaultProxy (2) Fiddler/Tools/Options/HTTPS/Decrypt HTTPS/etc. (because HTTPS is technically not a protocol, merely a URI scheme for 'http secure') – Bad Loser Aug 7 '17 at 7:51

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.