[MapProxy] Difficulty setting up Custom Projections

Marc Harter mharter at adc4gis.com
Mon Jun 7 15:52:42 EDT 2010


I have this setup in my proxy.yaml file:

srs:
    proj_data_dir: "/var/www/mapproxy/srs"

In that directory I have a file called 'espg' that contains this:

<103930> +proj=tmerc +lat_0=44.66111111111111 +lon_0=-92.63333333333334 +k=1 +x_0=141732.2834645669 +y_0=0 +a=6378413.671 +b=6357028.9851403 +to_meter=0.3048006096012192 +no_defs <>

When I try to start my development server I get this stacktrace:

$ paster serve etc/develop.ini --reload

Starting subprocess with file monitor
2010-06-07 08:15:58,085 - INFO - 16010:mapproxy.core.conf_loader:load_services - Reading services configuration: /var/www/mapproxy/etc/services.yaml
2010-06-07 08:15:58,207 - INFO - 16010:mapproxy.core.srs:_init_proj - loading proj data from /var/www/mapproxy/srs
Traceback (most recent call last):
  File "/root/venv/mapproxy/bin/paster", line 9, in <module>
    load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')()
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/script/command.py", line 84, in run
    invoke(command, command_name, options, args[1:])
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/script/command.py", line 123, in invoke
    exit_code = runner.run(args)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/script/command.py", line 218, in run
    result = self.command()
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/script/serve.py", line 276, in command
    relative_to=base, global_conf=vars)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/script/serve.py", line 313, in loadapp
    **kw)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 204, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 225, in loadobj
    return context.create()
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 625, in create
    return self.object_type.invoke(self)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 188, in invoke
    filtered = context.next_context.create()
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 625, in create
    return self.object_type.invoke(self)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 110, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/paste/deploy/util/fixtypeerror.py", line 57, in fix_call
    val = callable(*args, **kw)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/core/app.py", line 51, in app_factory
    return make_wsgi_app(services_conf)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/core/app.py", line 103, in make_wsgi_app
    services = load_services(services_conf)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/core/conf_loader.py", line 90, in load_services
    server[server_name] = server_loader(server_name)(proxy_conf)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/wms/conf_loader.py", line 81, in create_wms_server
    layers[name] = configured_layer(layer)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/wms/conf_loader.py", line 93, in configured_layer
    for source in layer_conf.sources]
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/wms/conf_loader.py", line 122, in _configured_layer
    layer.append(source.configured_layer())
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/wms/conf_loader.py", line 183, in configured_layer
    return WMSCacheLayer(self.configured_cache(), fi_source=fi_source)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/core/conf_loader.py", line 263, in configured_cache
    self.init_grid()
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/wms/conf_loader.py", line 193, in init_grid
    self.grid = tile_grid_for_epsg(epsg=srs, tile_size=tile_size, bbox=bbox, res=res)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/core/grid.py", line 61, in tile_grid_for_epsg
    return TileGrid(epsg, is_geodetic=True, bbox=bbox, tile_size=tile_size, res=res)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/core/grid.py", line 92, in __init__
    self.srs = SRS(epsg)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/core/srs.py", line 80, in SRS
    srs = _SRS(srs_code)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/mapproxy/core/srs.py", line 104, in __init__
    self.proj = Proj(init='epsg:%d' % epsg_num)
  File "/root/venv/mapproxy/lib/python2.6/site-packages/pyproj/__init__.py", line 148, in __new__
    return _Proj.__new__(self, projstring)
  File "_proj.pyx", line 25, in _proj.Proj.__cinit__ (_proj.c:562)
RuntimeError: no system list, errno: 2

Anything I'm doing wrong?  Any help would be greatly appreciated!

Thanks,
Marc


More information about the MapProxy mailing list