[MapProxy] Error when setting srs in custom grid

Tom Christian thomaschristian at gmail.com
Tue Sep 29 17:29:42 PDT 2020


I'm trying to configure a custom grid in mapproxy but almost every
configuration I've tested results in a 500 Internal Server Error with no
information in the log when requesting a GetCapabilities response. I'll
post the complete config below, but this is the problem section:

grids:
  custom_grid:
    base: GLOBAL_GEODETIC
    srs: EPSG:4269

custom_grid is referenced by a cache whose source is a WMS service that
does support EPSG:4269. I've tried using a range of EPSG codes taken from
the upstream WMS's SRS list and they all fail in the same way. While
testing this issue I only have a single layer, source, cache, and grid.

If I set the grid srs property to EPSG:4326, EPSG:3857, EPSG:900913, or
EPSG:102100 I get the expected GetCapabilities document. Anything other
than these somewhat standard values throws the error. I have tried removing
and changing the 'base' property but this made no difference.

In trying to understand the issue I reviewed the mapproxy source and saw
that by setting MAPPROXY_USE_PYPROJ and installing pyproj (using version
1.9.6 thanks to this issue <https://github.com/mapproxy/mapproxy/issues/417>)
I can use pyproj instead of libproj. However this also made no difference.

Can anyone tell me what might be causing the error when an uncommon srs
property is used in the grid and how I might address it? Any help much
appreciated!

---------------
Full config (some parts omitted for brevity):

services:
  wms:
    srs: [EPSG:4267, ..., EPSG:42303]
    versions: [1.1.1, 1.3.0]
layers:
- name: Canadian_15m_CDEM
  sources: [Canadian_15m_CDEM_cache]
  title: Canadian 15m CDEM
caches:
  Canadian_15m_CDEM_cache:
    cache:
      directory: /srv/mapproxy/cache_data/goc/
      directory_layout: reverse_tms
      type: file
    grids: [custom_grid]
    sources: [Canadian_15m_CDEM_src]
sources:
  Canadian_15m_CDEM_src:
    concurrent_requests: 0
    on_error:
      404:
        cache: false
        response: transparent
    req:
      layers: WMS-Elevation
      transparent: true
      url: http://maps.geogratis.gc.ca/wms/elevation_en?service=wms
    type: wms
grids:
  custom_grid:
    base: GLOBAL_GEODETIC
    srs: EPSG:4269
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20200929/df200265/attachment.html>


More information about the MapProxy mailing list