[MapProxy] Error initializing Proj on EPSG:28992
Milo van der Linden
milo at dogodigi.net
Mon Nov 12 01:44:08 PST 2012
Oh, and my sources section:
sources:
nl_wms:
type: wms
req:
url: http://www.mapcache.org/geoserver/wms?SERVICE=WMS&
layers: nederland
2012/11/12 Milo van der Linden <milo at dogodigi.net>
> I got my mapproxy up and running with EPSG:28992, no problem. Let me give
> you my configuration, perhaps it helps:
>
> services:
> demo:
> tms:
> wmts:
> wms:
> srs: ['EPSG:4326', 'EPSG:900913', 'EPSG:28992']
>
> layers:
> - name: nederland
> title: Basiskaart
> sources: [nl_cache]
>
> caches:
> nl_cache:
> grids: [geonovum_grid]
> sources: [nl_wms]
>
> grids:
> global_geodetic_sqrt2:
> base: GLOBAL_GEODETIC
> res_factor: 'sqrt2'
> geonovum_grid:
> tile_size: [256, 256]
> srs: 'EPSG:28992'
> bbox: [-285401.920, 22598.080, 595401.920, 903401.920]
> bbox_srs: 'EPSG:28992'
> res: [3440.64, 1720.32, 860.16, 430.08, 215.04, 107.52, 53.76, 26.88,
> 13.44, 6.72, 3.36, 1.68, 0.84, 0.42, 0.21, 0.105]
>
> 2012/11/12 Martijn Coenen <martijn at covadis.nl>
>
>> 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
>>
>>
>> _______________________________________________
>> MapProxy mailing list
>> MapProxy at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapproxy
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20121112/20f50c63/attachment.html>
More information about the MapProxy
mailing list