[MapProxy] Serving MBTiles via MapProxy

Jorge Arévalo jorge.arevalo at deimos-space.com
Mon Dec 5 11:57:44 EST 2011

2011/11/22 Oliver Tonnhofer <olt at omniscale.de>:
> On 21.11.2011, at 18:37, Jorge Arévalo wrote:
>> All my tiles form a coverage inside the BBOX (in epsg:4326):
>> [-6.54,38.35,-3,40.65]
>> But the problem is I get a blank image of 256x256 px, and a HTTP code
>> 200. So, the response is ok, but nothing is rendered in it. The
>> MBTiles coverage is ok. I can see it in a desktop viewer. Here, an
>> screenshot:
>> http://dl.dropbox.com/u/6599273/capturas/mbtiles_coverage.png
>> So, where can be the problem?
> How did you create the MBTiles? Are you sure that it contains tiles from level 0 on? You can check with sqlite from the commandline:
> sqlite3 mytiles.mbtiles 'select * from tiles where zoom_level = 0'


Sorry for the delay in my response. I was busy with a different project.

My MBTiles file actually only contains zooms from 4 to 14. Google Maps
zoom levels. My metadata are:

bounds: -6.54,38.35,-3,40.65
minzoom: 4
maxzoom: 14

When I execute the 'demo' program and try to fetch my data using the
WMS service and PNG format, this is one of the queries I get:

GET /service?LAYERS=my_mbtiles_layer&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPT=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-1.598789691925,1.577430847,-1.5859150886536,1.5857005119323&WIDTH=600&HEIGHT=400

The BBOX looks strange for me... I've defined the extent of my layer
in the 'grid' section, as you can see, but the BBOX defined for the
query is a really tiny one (where does it come from?). Anyway, if I
manually rewrite the query using my defined BBOX:

GET /service?LAYERS=my_mbtiles_layer&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPT=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-6.54,38.35,-3,40.65&WIDTH=600&HEIGHT=400

I get an empty image too. Concretely, a 600x400 empty PNG file.
Dimensions and file type are ok, but the image is only white. I don't
know what's happening, but my bets are:

- Something related with the zoom levels (I only have Google Maps 4-14)
- Something related with my defined grid (res_factor?)

Any other suggestion?

Best regards,

Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arevalo at deimos-space.com

More information about the MapProxy mailing list