[MapProxy] publish ArcGIS Server cache as TMS and WMS
Duarte Carreira
DCarreira at edia.pt
Mon Mar 7 11:29:27 EST 2011
Thanks for your answers.
I'm including the config below.
I have now been able to avoid the error. I only get a warning:
2011-03-07 16:27:43,187 - WARNING - 2644:mapproxy.config.loader:__init__ - unexp
ected key format
Starting server in PID 2644.
serving on 0.0.0.0:8080 view at http://127.0.0.1:8080
Also, I can only get to see the tiles with QGIS by using a GDAL WMS xml file, but tiles are not in the right place, or rather I get the wrong tiles, producing a garbled map (tiles are not in the correct sequence).
Duarte
services:
demo:
kml:
tms:
# needs no arguments
wms:
srs: ['EPSG:900913']
image_formats: ['image/jpeg', 'image/png']
md:
# metadata used in capabilities documents
title: MapProxy WMS Proxy
abstract: This is the fantastic MapProxy.
online_resource: http://mapproxy.org/
layers:
- name: agslayer
title: ags esri
sources: [ags_cache]
caches:
ags_cache:
grids: [GLOBAL_MERCATOR, global_geodetic_sqrt2]
sources: [ags_rest]
sources:
ags_rest:
type: tile
url: http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/%(z)s/%(y)s/%(x)s
format: image/png
origin: nw
-----Mensagem original-----
De: Oliver Tonnhofer [mailto:tonnhofer at omniscale.de]
Enviada: segunda-feira, 7 de Março de 2011 07:01
Para: Duarte Carreira
Cc: mapproxy at lists.osgeo.org
Assunto: Re: [MapProxy] publish ArcGIS Server cache as TMS and WMS
On 06.03.2011, at 21:40, Duarte Carreira wrote:
> So I'm trying MapProxy with an ESRI cache, and I get this error:
>
> File "c:\python25\lib\site-packages\mapproxy-1.0.0-py2.5.egg\mapproxy\config\l
> oader.py", line 781, in wms_layer
> map_layer = self.context.sources[source_name].source()
> File "c:\python25\lib\site-packages\mapproxy-1.0.0-py2.5.egg\mapproxy\config\l
> oader.py", line 619, in source
> format = file_ext(params['format'])
> KeyError: 'format'
>
> I have the simplest yaml possible. A single layer, a single source, and a single cache...
Please post that configuration, it's really hard to guess.
> I tried also with no cache, same result.
You need to use a cache for tile sources. You can disable additional caching with `disable_storage`, but all the tile magic of MapProxy happens inside the 'cache'. And then, the format should be passed from the cache to the source and you shouldn't get an error like that.
Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.de
http://mapproxy.org | https://bitbucket.org/olt
More information about the MapProxy
mailing list