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

Christian Willmes c.willmes at uni-koeln.de
Tue Mar 15 10:50:23 EDT 2011


this works!

Thanks a lot Jorge

On 15.03.2011 15:44, Jorge Gaspar Sanz Salinas wrote:
> 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
> 
_______________________________________________
MapProxy mailing list
MapProxy at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapproxy

-- 
Christian Willmes
AG GIS & Fernerkundung      | GIS & RS Group
Geographisches Institut     | Institute of Geography
Universität zu Köln         | University of Cologne
Tel.: +49 (0)221 470 6234
Fax.: +49 (0)221 470 2280
http://www.geographie.uni-koeln.de/gis
http://www.sfb806.de


More information about the MapProxy mailing list