[QGIS-Developer] WMTS/XYZ on high DPI screens

Martin Dobias wonder.sk at gmail.com
Wed Feb 27 02:49:06 PST 2019


Hi Richard

On Wed, Feb 27, 2019 at 10:47 AM Richard Duivenvoorde
<rdmailings at duif.net> wrote:
>
> not sure if this is helpfull, but Matthijs of the OpenGeoGroep.nl
> created a hidpi tilecache for mac users not so long ago for an Dutch,
> osm based base map. I asked him what he did.  He says (translated):
>
> "Yes we serve two versions, eg"
>
> http://www.openbasiskaart.nl/mapcache/wmts/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=osm-nb&STYLE=default&TILEMATRIXSET=rd&TILEMATRIX=5&TILEROW=16&TILECOL=15&FORMAT=image%2Fpng
>
> http://www.openbasiskaart.nl/mapcache/wmts/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=osm-nb-hq&STYLE=default&TILEMATRIXSET=rd-hq&TILEMATRIX=5&TILEROW=16&TILECOL=15&FORMAT=image%2Fpng

Thanks for this - good to have also a WMTS service for testing. HQ
tiles look nice and crisp compared to the standard version :-)


> "Only the tileing protocol metadata is not really prepeared for HQ
> tiles. I now set it up i a way that for HiDPI tiles you have use the
> same TILEMATRIX, TILEROW en TILEROW, but you receive either a 256x256
> tile or a 512x512 tile depending on the TILEMATRIXSET. But you have to
> fool the tile server a little, so if you use current URL
> (http://www.openbasiskaart.nl/mapcache and layer with HQ in QGIS) you
> get big labels."

Yeah if I am not wrong that's the limitation of WMTS protocol - it
does not tell you the true DPI (you _should_ assume 90 DPI according
to the standard). For a WMTS offering mixed bag of tile resolutions I
am not sure what would be the best solution - a single DPI setting for
the whole connection won't work well - you would need two
connections... one for normal-res tiles, the other for high-res tiles.
Another solution could be per tileset configuration of true DPI, but
that would be even more complicated...

Cheers
Martin


More information about the QGIS-Developer mailing list