I came across Geoffery Hing’s walk through on using Tilestache to serve up mbtiles to QGIS. I followed the configuration and I was able to view tiles in the browser without any problems. However, when I try to load the XML in QGIS, all I get is an image that looks roughly like scrambled cable from the days of yore:
My tilestache.xml is as follows:
<GDAL_WMS>
<Service name="TMS">
<ServerUrl>http://127.0.0.1:8080/${z}/${x}/${y}.png</ServerUrl>
</Service>
<DataWindow>
<UpperLeftX>-73.009</UpperLeftX>
<UpperLeftY>41.3578</UpperLeftY>
<LowerRightX>-72.8394</LowerRightX>
<LowerRightY>41.2355</LowerRightY>
<TileLevel>13</TileLevel>
<TileCountX>1</TileCountX>
<TileCountY>1</TileCountY>
<YOrigin>top</YOrigin>
</DataWindow>
<Projection>EPSG:900913</Projection>
<BlockSizeX>256</BlockSizeX>
<BlockSizeY>256</BlockSizeY>
<BandsCount>3</BandsCount>
<Cache />
</GDAL_WMS>
I have a hunch that this is a problem with tilestache and perhaps its dependencies. GDAL is version 1.9, which should be sufficient. I have no problem loading tiles from openstreet map using this XML.
<GDAL_WMS>
<Service name="TMS">
<ServerUrl>http://tile.openstreetmap.org/${z}/${x}/${y}.png</ServerUrl>
</Service>
<DataWindow>
<UpperLeftX>-20037508.34</UpperLeftX>
<UpperLeftY>20037508.34</UpperLeftY>
<LowerRightX>20037508.34</LowerRightX>
<LowerRightY>-20037508.34</LowerRightY>
<TileLevel>18</TileLevel>
<TileCountX>1</TileCountX>
<TileCountY>1</TileCountY>
<YOrigin>top</YOrigin>
</DataWindow>
<Projection>EPSG:900913</Projection>
<BlockSizeX>256</BlockSizeX>
<BlockSizeY>256</BlockSizeY>
<BandsCount>3</BandsCount>
<Cache />
</GDAL_WMS>
When I run gdalinfo on the mbtiles, I get an error saying that they are not a recognized file format. I suspect this is at the root of my problem, but I am at a loss as to how to fix this.