My goal is to use mapcache to generate a ZXY tileset. This tileset can then be used directly by the client with no server requirement.
The reason for mapcache is that I have a set of mapserver map files that contain all of my styling.
I have configured mapcache.xml as follows:-
<cache name="disk_test" type="disk" layout="template">
<template>/tmp/disk_test/rbwm_mastermap/{z}/{x}/{y}.{ext}</template>
</cache>
<tileset name="test_zxy">
<source>MY MAPFILE SOURCE</source>
<cache>disk_test</cache>
<grid>ZXY</grid>
<format>PNG</format>
<metatile>1 1</metatile>
<metabuffer>10</metabuffer>
<expires>3600</expires>
<auto_expire>2678400</auto_expire>
</tileset>
<grid name="ZXY">
<size>256 256</size>
<extent>-20037508.3427892480 -20037508.3427892480 20037508.3427892480 20037508.3427892480</extent>
<srs>EPSG:3857</srs>
<units>m</units>
<resolutions>2000 1000 500 400 200 100 50 25 20 10 9 8 7 6 5 4 3 2.5 2 1.5 1 0.3 0.2</resolutions>
</grid>
The following request creates a tile in 20/77961/104498.png
SERVICE=WMS&VERSION=1.1.1&
REQUEST=GetMap&
LAYERS=test_zxy&
WIDTH=256&HEIGHT=256&
FORMAT=image/png&
SRS=EPSG:3857&
TILED=true&
DPI=72&
MAP_RESOLUTION=72&
FORMAT_OPTIONS=dpi:72&
TRANSPARENT=TRUE&BBOX=-79492.34278900176286697,6713979.65721099823713303,-79236.34278900176286697,6714235.65721099823713303
My calculations show that this is wrong as it should be closer to:-
20/522208/348614.png
Am I doing something wrong in my grid or template?