[MapProxy] Configuring mapproxy.yaml for WMTS

Pau Perez asistenciagis2_ctv at gva.es
Fri Jul 29 08:51:27 EDT 2011


Hello,

I'm new in MapProxy and I'm configuring a mapproxy.yaml for serve WMTS from a WMS. 


#MapProxy sample configuration file

services:
  demo:
  kml:
  tms:
  wmts:
  wms:
    srs: ['EPSG:25830', 'EPSG:23030', 'EPSG:4326']
    image_formats: ['image/jpeg', 'image/png']
    md:
      title: WMS Orto ICV MapProxy
      abstract: Servicio cacheado WMS Orto ICV
      online_resource: http://cartoweb.cma.gva.es
      contact:
        person: Pau Pérez
        position: Asistencia GIS
        organization: http://cma.gva.es
        email: asistenciagis2_ctv[at]gva.es
        fees: 'None'

layers:
  - name: orto_icv
    title: Orto ICV
    sources: [orto_cache]
    
caches:
  orto_cache:
    grids: [grid_orto]
    sources: [wms_orto]
    meta_size: [1,1]
    meta_buffer: 0

sources:
 wms_orto:
  type: wms
  supported_srs: ['EPSG:25830']
  req:
   url: http://terramapas.icv.gva.es/cgi-bin/mapserv?map=/var/www/portal/map/servidor.map
   layers: ortoactualcv5,ortofoto20,ortoactual50,mdt300,hipso_800m
   format: image/jpeg
   transparent: false
    
grids:
  grid_orto:
    #base: GLOBAL_GEODETIC
    srs: EPSG:25830
    tile_size: [256,256]
    bbox: [-180, -90, 180, 90]
    #bbox: [500000, 4100000, 900000, 4600000]
    #bbox_srs: EPSG:25830
    num_levels: 7
    #res: [500, 400, 200, 100, 50, 20, 5]
    #num_levels: 20
    min_res: 0.703125

globals:
  image:
      resampling_method: nearest
  cache:
    base_dir: './cache_data'
    lock_dir: './cache_data/locks'

When I put bbox in geographic coordinates, bounding box in WMS GetCapabilities is wrong.

<Title>WMS Orto ICV MapProxy</Title>
<SRS>EPSG:25830 EPSG:23030 EPSG:4326</SRS>
<LatLonBoundingBox minx="-7.49035650276" miny="-0.000811745628289" maxx="-7.48713126351" maxy="0.000811745628289"/>
<BoundingBox SRS="EPSG:4326" minx="-7.49035650276" miny="-0.000811745628289" maxx="-7.48713126351" maxy="0.000811745628289"/>

and request GetMap not return image for wrong definition of bbox.
The WMTS Get Capabilities request works fine (There are response of service).

The problem is when I change bbox to ETRS89-UTM coordinates (EPSG:25830), where WMS works fine (there are image in GetMap), but WMTS GetCapabilities request have an error:

  a.. File "C:\Python27\lib\site-packages\mapproxy-1.1.2-py2.7.egg\mapproxy\wsgiapp.py", line 159, in __call__
resp = self.handlers[handler_name].handle(req)b.. File "C:\Python27\lib\site-packages\mapproxy-1.1.2-py2.7.egg\mapproxy\service\ows.py", line 38, in handle
return self.services[service].handle(req)c.. File "C:\Python27\lib\site-packages\mapproxy-1.1.2-py2.7.egg\mapproxy\service\base.py", line 30, in handle
return handler(parsed_req)d.. File "C:\Python27\lib\site-packages\mapproxy-1.1.2-py2.7.egg\mapproxy\service\wmts.py", line 58, in capabilities
result = Capabilities(service, self.layers.values(), self.matrix_sets).render(request)e.. File "C:\Python27\lib\site-packages\mapproxy-1.1.2-py2.7.egg\mapproxy\service\wmts.py", line 95, in render
return self._render_template(_map_request.capabilities_template)f.. File "C:\Python27\lib\site-packages\mapproxy-1.1.2-py2.7.egg\mapproxy\service\wmts.py", line 101, in _render_template
tile_matrix_sets=self.matrix_sets)g.. File "C:\Python27\lib\site-packages\mapproxy-1.1.2-py2.7.egg\mapproxy\util\ext\tempita\__init__.py", line 160, in substitute
result, defs, inherit = self._interpret(ns)h.. File "C:\Python27\lib\site-packages\mapproxy-1.1.2-py2.7.egg\mapproxy\service\wmts.py", line 142, in __iter__
origin = self.grid.origin_tile(level, 'ul')i.. File "C:\Python27\lib\site-packages\mapproxy-1.1.2-py2.7.egg\mapproxy\grid.py", line 443, in origin_tile
assert self.supports_access_with_origin(origin), 'TODO error exception'j.. 
  k.. And I can't define bbox correctly in grid_orto with SRS that I use (EPSG:25830).
  l.. 
  m.. ¿I making anything wrong? ¿Is this a limitation of MapProxy with WMTS?
  n.. 
Thanks in advance.

--------------------------------------------------------
Pau Pérez Puigcerver
--------------------------------------------------------
Prodevelop, Integración de tecnologías
http://www.prodevelop.es
--------------------------------------------------------
Servicio de Informática
Conselleria de Infraestructuras, Territorio y Medio Ambiente
C./ Francisco Cubells, 7
46011 Valencia
Telf.: 96 197 3941
Email: asistenciagis2_ctv at gva.es
http://www.cma.gva.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapproxy/attachments/20110729/3c957d03/attachment-0001.html


More information about the MapProxy mailing list