Its great that you can now use TMS layers in qgis! Only, my result is broken. At the 3 highest resolution zoom levels it looks perfect, but at lower resolution layers, i get mixtures of tile shift, black tiles, bright noise colors, etc.
Heres examples of lower zoom (nb: vectors are seperate layers). pic http://zoneblue.org/files/qgis-tms.jpg
Im using qgis 2.4.0. Here is my xml:
<GDAL_WMS>
<Service name="TMS">
<ServerUrl>file:///E:/gis/tilesets/ortho/${z}/${x}/${y}.jpg</ServerUrl>
<SRS>EPSG:2193</SRS>
<ImageFormat>image/jpeg</ImageFormat>
</Service>
<DataWindow>
<UpperLeftX>1678531.2</UpperLeftX>
<LowerRightY>5636060.0</LowerRightY>
<LowerRightX>1703824.0</LowerRightX>
<UpperLeftY>5669442.4</UpperLeftY>
<TileLevel>9</TileLevel>
<YOrigin>bottom</YOrigin>
<SizeX>63232</SizeX>
<SizeY>83456</SizeY>
<TileCountX>247</TileCountX>
<TileCountY>326</TileCountY>
</DataWindow>
<Projection>EPSG:2193</Projection>
<BlockSizeX>256</BlockSizeX>
<BlockSizeY>256</BlockSizeY>
<BandsCount>3</BandsCount>
</GDAL_WMS>
The tileset has 0-9 levels, 0-246 for the folders, 0-325 for the files. 0.4m per px imagery. Everything is transverse mercator.
You just make a xml file with the above in it, add a raster layer with it, and its done. Note that the pixel size and coordinate extents must be for the whole tiles, not just your data extent.
Anyway am i doing something wrong, or is this a bug?
I have read and reread the gdal minidriver spec here, but its not very detailed. http://www.gdal.org/frmt_wms.html