[MapProxy] Seeding mapproxy with a previously generated TMS cache

Jorge Arévalo jorge.arevalo at deimos-space.com
Mon Nov 7 09:25:46 EST 2011


Hello,

I've executed:

mb-util /path/to/my_tiles_dir my_tiles.mbtiles

The file my_tiles.mbtiles has been created. Now I can execute: sqlite3
my_tiles.mbtiles

And I see 2 tables: metadata and tiles. The table tiles contain my
tiles (select * from tiles gives me my tiles), but metadata is empty.
Is it normal?

Apart from this, I added those lines to mymapproxy.yaml:

layers:
  - name: mylayer
    title: My layer, built from tiles
    sources: [mylayer_cache]

caches:
  mylayer_cache:
    type:mbtiles
    filename: /path/to/my_tiles.mbtiles

Now, I can see my layer served under WMS or TMS services, but when I
enter (using 'demo' from developing server), I see an empty map. Did I
forget something obvious so far?

Many thanks, and best regards,
Jorge

2011/11/3 Jaak Laineste <jaak at nutiteq.com>:
>
> I would try:
>
>  1. configure mapproxy to use sqlite (MBTiles format) as cache format
>
>  2. use https://github.com/mapbox/mbutil to convert your directory to MBTiles. Note that MBTiles uses TMS x/y/z scheme, but Google uses a bit different one (also OSM), there is parameter "--scheme osm" but I think the parameter worked only for MBTiles->files conversion side, and not for your direction. Anyway, it should be easy to fix it: osm and tms scheme difference is only in flipped y coordinate (and there is flip_y method).
>
>  3. copy data from your MBTiles to mapproxy MBTiles. Check if they are really the same: maybe some metadata tables need to be there.
>
> Jaak
>
> On 03.11.2011, at 18:24, Jorge Arévalo wrote:
>
>> Hello everybody,
>>
>> I'd like to know if it's possible to "seed" mapproxy with a directory
>> structure like this (Google Maps zoom levels 4-14)
>>
>> http://dl.dropbox.com/u/6599273/tms_cache.png
>>
>> So, I actually have a set of pre-generated tiles (generated with
>> gdal2tiles, if helps), and I want to serve them using MapProxy. I've
>> read that I can use an existing Tile Server as source
>> (http://mapproxy.org/docs/1.2.0/sources.html#tiles), but I don't have
>> a Tile Server, only a big bunch of tiles stored at disk. How could I
>> configure MapProxy to serve them?
>>
>> Many thanks in advance, and best regards
>> --
>> Jorge Arévalo
>> Internet & Mobility Division, DEIMOS
>> jorge.arevalo at deimos-space.com
>> http://es.linkedin.com/in/jorgearevalo80
>> http://mobility.grupodeimos.com/
>> http://gis4free.wordpress.com
>> http://geohash.org/ezjqgrgzz0g
>> _______________________________________________
>> MapProxy mailing list
>> MapProxy at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapproxy
>
>



-- 
Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arevalo at deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g


More information about the MapProxy mailing list