[MapProxy] Custom projections problem

Максим Хитрин hitrymax at gmail.com
Sun Jul 7 22:01:44 PDT 2013


Hi, list

I've got a problem with adding a custom projection definition.

So, I've made a file named "epsg", add it to the directory "epsg" in
mapproxy folder and add this definition in it:

<100741> +proj=tmerc +lat_0=0 +lon_0=58.03333333333 +k=1
+x_0=1300000+y_0=-5509414.70 +ellps=krass +towgs84=23.57, -140.95, -79.8,
0, 0.35,0.79, -0.22 +units=m +no_defs <>

Also, marked it in mapproxy.yaml

srs:
  proj_data_dir: 'epsg\'

But mapprxy fail to start with this settings showing following errors:


C:\>C:\Python27\Scripts\mapproxy-util.exe serve-develop -b 8081
C:\Python27\myma
pproxy\mapproxy.yaml
[2013-07-08 10:59:17,648] mapproxy.config - INFO - reading:
C:\Python27\mymappro
xy\mapproxy.yaml
[2013-07-08 10:59:17,663] mapproxy.config - WARNING - unknown 'paletted' in
glob
als
[2013-07-08 10:59:17,694] mapproxy.system - INFO - loading proj data from
C:\Pyt
hon27\mymapproxy\epsg\
Traceback (most recent call last):
  File "C:\Python27\Scripts\mapproxy-util-script.py", line 9, in <module>
    load_entry_point('mapproxy==1.5.0', 'console_scripts',
'mapproxy-util')()
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\script\u
til.py", line 337, in main
    commands[command]['func'](args)
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\script\u
til.py", line 76, in serve_develop_command
    app = make_wsgi_app(mapproxy_conf, debug=options.debug)
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\wsgiapp.
py", line 100, in make_wsgi_app
    services = conf.configured_services()
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\config\l
oader.py", line 206, in configured_services
    return self.services.services()
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\config\l
oader.py", line 1208, in services
    new_services = creator(service_conf or {})
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\config\l
oader.py", line 1301, in wms_service
    root_layer = self.context.wms_root_layer.wms_layer()
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\util\__i
nit__.py", line 86, in wrapper
    func.__memoize_cache[key] = func(*args)
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\config\l
oader.py", line 1081, in wms_layer
    layers.append(WMSLayerConfiguration(layer_conf,
self.context).wms_layer())
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\util\__i
nit__.py", line 86, in wrapper
    func.__memoize_cache[key] = func(*args)
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\config\l
oader.py", line 1084, in wms_layer
    this_layer = LayerConfiguration(self.conf, self.context).wms_layer()
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\util\__i
nit__.py", line 86, in wrapper
    func.__memoize_cache[key] = func(*args)
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\config\l
oader.py", line 1123, in wms_layer
    map_layer = source_conf.source()
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\config\l
oader.py", line 616, in source
    supported_srs = [SRS(code) for code in self.conf.get('supported_srs',
[])]
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\srs.py",
 line 88, in SRS
    srs = _SRS(srs_code)
  File
"C:\Python27\lib\site-packages\mapproxy-1.5.0-py2.7.egg\mapproxy\srs.py",
 line 121, in __init__
    self.proj = Proj(init='epsg:%d' % epsg_num)
  File
"C:\Python27\lib\site-packages\pyproj-1.9.3-py2.7-win32.egg\pyproj\__init
__.py", line 343, in __new__
    return _proj.Proj.__new__(self, projstring)
  File "_proj.pyx", line 80, in _proj.Proj.__cinit__ (_proj.c:950)
RuntimeError: no options found in 'init' file

Regards,
Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20130708/a3c5e5f4/attachment.html>


More information about the MapProxy mailing list