[MapProxy] Error initializing Proj on EPSG:28992

Martijn Coenen martijn at covadis.nl
Mon Nov 12 01:04:53 PST 2012


Hello Mapproxy-world,

Relatively new to Mapproxy, but very impressed about the capabilities and
functionality of this "tool". The ease of configuration and the ability to
bundle different sources (and types) will help me a lot here.

The one and only issue I have, is our Dutch RD projection, EPSG 28992. One
way or another, Mapproxy doesn't like it. It returns an "internal error" on
the Demo and via the WMS service when requesting a map with this
projection. EPSG 900913, 4326 and so on work fine (but with projection
errors as I need 28992).

The source is 28992, in this test WMTS at
http://geodata.nationaalgeoregister.nl/tiles/service/wmts/brtachtergrondkaart/
.
The source URL in my configuration is as follows:

sources:
 [...]
     Top10NLwmts:
    type: tile
    supported_srs: ['EPSG:28992']
    url:
http://geodata.nationaalgeoregister.nl/tiles/service/wmts/brtachtergrondkaart/?LAYER=brtachtergrondkaart&SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&TILEMATRIXSET=EPSG%%3A28992&TILEMATRIX=EPSG%%3A28992%%3A%(z)s&TILEROW=%(y)s&TILECOL=%(x)s&FORMAT=image%%2Fpng

It retrieves the data and it is visible on the demo pages (in 900913 and
4326).

Grids:
grids:
  applas_grid:
#     bbox: [5.927811,51.997604,6.0,52.5]
     srs: EPSG:900913
     base: GLOBAL_GEODETIC
     origin: nw
     #tile_size: [256, 256]

And in my services config:
 wms:
    srs: ['EPSG:900913','EPSG:4326','EPSG:28992']

Now, when requesting the demo (or service) on 28992, it gives a HTTP 500
(no further info).
The debug window of Python reads:

Traceback (most recent call last):
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
wsgiapp.py", line 133, in __call__
    resp = self.handlers[handler_name].handle(req)
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
service\demo.py", line 76, in handle
    demo = self._render_wms_template('demo/wms_demo.html', req)
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
service\demo.py", line 159, in _render_wms_template
    bbox = layer.extent.bbox_for(SRS(srs))
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
srs.py", line 88, in SRS
    srs = _SRS(srs_code)
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
srs.py", line 121, in __init__
    self.proj = Proj(init='epsg:%d' % epsg_num)
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
platform\cpython\proj.py", line 172, in __init__
    (proj_def, init, libproj.pj_strerrno(errno)))
ProjInitError: error initializing Proj(proj_def=None, init='epsg:28992'):
no sys
tem list, errno: 2

Traceback (most recent call last):
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
wsgiapp.py", line 133, in __call__
    resp = self.handlers[handler_name].handle(req)
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
service\demo.py", line 76, in handle
    demo = self._render_wms_template('demo/wms_demo.html', req)
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
service\demo.py", line 159, in _render_wms_template
    bbox = layer.extent.bbox_for(SRS(srs))
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
srs.py", line 88, in SRS
    srs = _SRS(srs_code)
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
srs.py", line 121, in __init__
    self.proj = Proj(init='epsg:%d' % epsg_num)
  File
"C:\Python27\virtual\lib\site-packages\mapproxy-1.4.0-py2.7.egg\mapproxy\
platform\cpython\proj.py", line 172, in __init__
    (proj_def, init, libproj.pj_strerrno(errno)))
ProjInitError: error initializing Proj(proj_def=None, init='epsg:28992'):
no sys
tem list, errno: 2

Now I'm a bit lost here as I have no clue about the internals of Mapproxy.

Anyone out here able to point me in the right direction? If any info is
needed, please do say so.

Best regards,
Martijn Coenen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20121112/40b28fb6/attachment.html>


More information about the MapProxy mailing list