[MapProxy] caching from a.tile.openstreetmap.org with mapproxy

Jorge Gaspar Sanz Salinas jsanz at osgeo.org
Tue Mar 15 10:44:53 EDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

El 15/03/2011 15:40, Christian Willmes escribió:
> Ok, found the one error myself. (sorry)
> 
> It has to be (changed x and y):
>   osm_tiles:
>     type: tile
>     grid: GLOBAL_MERCATOR
>     url: http://a.tile.openstreetmap.org/%(z)s/%(x)s/%(y)s.png
> 
> But z seems to be reversed.
> 
> See:
> http://dl.dropbox.com/u/21802018/service2.png
> 
> Can I solve this within the configuration or do I have to add code
> somewhere to reverse the Z order?
> 
> Thanks and regards,
> 
> Christian
> 
> 
> 
> On 15.03.2011 15:28, Christian Willmes wrote:
>> Hi,
>>
>> I'm playing around with caching the OSM tiles from
>> http://a.tile.openstreetmap.org localy using mapproxy.
>>
>> Tiles are getting accessed with urls like this from the server:
>> http://a.tile.openstreetmap.org/10/531/343.png
>>
>> I configured my source in MapProxy like this:
>>
>>   osm_tiles:
>>     type: tile
>>     grid: GLOBAL_MERCATOR
>>     url: http://a.tile.openstreetmap.org/%(z)s/%(y)s/%(x)s.png
>>
>> When I access the service through the MapProxy demo app, it logs the
>> following request:
>>
>> 127.0.0.1 - - [15/Mar/2011:15:13:26 +0200] "GET
>> /service?LAYERS=OSMTiles&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-113.5546875,-56.6015625,97.3828125,84.0234375&WIDTH=600&HEIGHT=400
>> HTTP/1.1" 200 38807
>> "http://localhost:5050/demo/?wms_layer=OSMTiles&format=image%2Fpng"
>> "Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.15) Gecko/20110303
>> Ubuntu/10.10 (maverick) Firefox/3.6.15"
>>
>> And I get this image (which is obviously not correct) back:
>>
>> http://dl.dropbox.com/u/21802018/service.png
>>
>> I guess this is somehow connected with the order of axis or with the
>> grid I use...
>>
>> Does anybody managed to cache this osm tile format and can share the
>> configuration?
>>
>> Thanks a lot!
>> Christian
>>
> 
> 

I have a very minimal config at http://pastebin.com/L3whrJDk but at the
end the important is this:

caches:
  osm_cache:
    grids: [global_mercator_osm]
    sources: [osm_tms]

sources:
  osm_tms:
    type: tile
    url: http://c.tile.openstreetmap.org/%(tms_path)s.png
    origin: nw

grids:
  global_mercator_osm:
    base: GLOBAL_MERCATOR
    num_levels: 18

- -- 
Jorge Gaspar Sanz Salinas
http://es.osgeo.org
http://jorgesanz.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNf3tkAAoJEAOYD75lvHdBa1gIAIbXNy+dVwdm20ZB5+QC474C
725nBDkbnmjlEzITmoq7C/KzPeQcBHU5UtBoJ4hLJ9sV9cg7plyXvb/9zRodyV0P
Ulfb8o1+Afvm0rNyztf/Qex4C3bSbywQ2/3oORoM0puD4aQywIvP4SNx5+DdXDAX
NqBnRC29d68JosAZBDunsL7dFKmmD46QpoXW2q714cwhoUlJbn/pghvqzT+F7/ph
94LIyltuULvJHLwtw4KGNrWWb1ZIbNAkUEFhESQ0eqeHIHuiKNmplHwqu2uLqfqs
U9weKyczS5UEtGKhM3lKroPxtJqdcwYg6ap1jehy7K/T1NQP7htqjEBqSoyUZwc=
=cx8u
-----END PGP SIGNATURE-----


More information about the MapProxy mailing list