[MapProxy] Configuring mapproxy.yaml for WMTS

Oliver Tonnhofer olt at omniscale.de
Fri Jul 29 12:36:21 EDT 2011


On 29.07.2011, at 14:51, Pau Perez wrote:
> 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
>  […]
> 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"/>

You need to set `bbox_srs: 'EPSG:4326'` if you use a geographic bbox. 

> 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:
>  
> […]
> assert self.supports_access_with_origin(origin), 'TODO error exception'

MapProxy/TMS and WMTS have a different tile order. MapProxy/TMS start from lower left corner with tile 0,0, but WMTS starts from top left corner. You need to configure a grid where the height of the BBOX is a multiple of the resolution*tile_size: from -90 to 90 is 180 which is 1/2 tile in the first level, 1 tile in the second level, 2 tiles in the third level, etc. In this case MapProxy can switch the axis order.

Alternatively, you can set the internal cache/grid of MapProxy to use the WMTS ordering with the `origin: ul` option of the grid. In this case WMTS should work, but not TMS (for the same reason).


Regards,
Oliver

-- 
Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.de
http://mapproxy.org | https://bitbucket.org/olt | @oltonn




More information about the MapProxy mailing list