Hi,<br>I'd like to use mapproxy to reproject a WMS-C service and use it as a WMS.<br>Is that possible?<br><br>I tried this conf:<br><br><i>services:<br> demo:<br> kml:<br> tms:<br> # needs no arguments<br> wms:<br>
srs: ['EPSG:2169']<br> image_formats: ['image/jpeg']<br> md:<br> # metadata used in capabilities documents<br> title: MapProxy WMS Proxy<br> abstract: This is the fantastic MapProxy.<br>
online_resource: <a href="http://mapproxy.org/">http://mapproxy.org/</a><br> contact:<br> person: Your Name Here<br> position: Technical Director<br> organization: <br> address: Fakestreet 123<br>
city: Somewhere<br> postcode: 12345<br> country: Germany<br> phone: +49(0)000-000000-0<br> fax: +49(0)000-000000-0<br> email: <a href="mailto:info@omniscale.de">info@omniscale.de</a><br>
access_constraints:<br> This service is intended for private and evaluation use only.<br> The data is licensed as Creative Commons Attribution-Share Alike 2.0<br> (<a href="http://creativecommons.org/licenses/by-sa/2.0/">http://creativecommons.org/licenses/by-sa/2.0/</a>)<br>
fees: 'None'<br><br>layers:<br> - name: Ortho<br> title: Ortho<br> sources: [ign_ortho_tile]<br> <br>grids:<br> mygrid:<br> srs: EPSG:310024802<br> bbox: [-1048576,3670016,2097152,6815744]<br>
bbox_srs: EPSG:310024802<br> origin: nw<br> res: [2048,1024,512,256,128,64,32,16,8,4,2,1,0.5,0.25,0.125,0.0625]<br> format: image/jpeg<br> <br><br>sources:<br> ign_ortho_tile:<br> type: tile<br> url: <a href="http://xxx.xxx.xx/wmsc?service=WMS&request=GetMap&version=1.1.1&layers=ORTHOIMAGERY.ORTHOPHOTOS&styles=&srs=EPSG:310024802&format=image/jpeg&width=256&height=256&bbox=%(bbox)s">http://xxx.xxx.xx/wmsc?service=WMS&request=GetMap&version=1.1.1&layers=ORTHOIMAGERY.ORTHOPHOTOS&styles=&srs=EPSG:310024802&format=image/jpeg&width=256&height=256&bbox=%(bbox)s</a><br>
format: image/jpeg<br> grid: mygrid<br clear="all"></i><br>but I keep getting this error when starting the service:<br><br>(mapproxy)[root@todd_ign mymapproxy]# mapproxy-util serve-develop mapproxy.yaml -b 0.0.0.0<br>
[2012-03-06 17:02:10,661] mapproxy.config - INFO - reading: mapproxy.yaml<br>[2012-03-06 17:02:10,685] mapproxy.config - WARNING - unknown 'format' in grids.mygrid<br>[2012-03-06 17:02:10,685] mapproxy.config - WARNING - unknown 'format' in sources.ign_ortho_tile<br>
[2012-03-06 17:02:10,766] mapproxy.system - INFO - using libproj for coordinate transformation<br>[2012-03-06 17:02:10,779] mapproxy.system - INFO - loading proj data from /usr/share/proj/<br>Traceback (most recent call last):<br>
File "/home/mapserver/mapproxy/bin/mapproxy-util", line 9, in <module><br> load_entry_point('MapProxy==1.3.0', 'console_scripts', 'mapproxy-util')()<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/script/util.py", line 319, in main<br>
commands[command]['func'](args)<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/script/util.py", line 72, in serve_develop_command<br> app = make_wsgi_app(mapproxy_conf, debug=options.debug)<br>
File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/wsgiapp.py", line 118, in make_wsgi_app<br> services = conf.configured_services()<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py", line 204, in configured_services<br>
return self.services.services()<br> File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__<br> self.gen.throw(type, value, traceback)<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/util/__init__.py", line 42, in local_base_config<br>
yield<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py", line 204, in configured_services<br> return self.services.services()<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py", line 1113, in services<br>
new_services = creator(service_conf or {})<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py", line 1188, in wms_service<br> root_layer = self.context.wms_root_layer.wms_layer()<br>
File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/util/__init__.py", line 86, in wrapper<br> func.__memoize_cache[key] = func(*args)<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py", line 1003, in wms_layer<br>
layers.append(WMSLayerConfiguration(layer_conf, self.context).wms_layer())<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/util/__init__.py", line 86, in wrapper<br> func.__memoize_cache[key] = func(*args)<br>
File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py", line 1006, in wms_layer<br> this_layer = LayerConfiguration(self.conf, self.context).wms_layer()<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/util/__init__.py", line 86, in wrapper<br>
func.__memoize_cache[key] = func(*args)<br> File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py", line 1041, in wms_layer<br> map_layer = self.context.sources[source_name].source()<br>
File "/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py", line 784, in source<br> format = file_ext(params['format'])<br>KeyError: 'format'<br><br><br>The other question is about BBOX and SRS. Actually in this case I want to use the BBOX in the WMS-C SRS (310024802), will this be used in the requests? <br>
I could not try it out.<br><br>What I try to achieve is to test if MapProxy can be an alternative to the solution described here (and which obviously has some issues;-)):<br><a href="http://t.co/2Ghb1WOS">http://t.co/2Ghb1WOS</a><br>
<br>Thanks in advance and best regards<br>Jeff<br><br>-- <br>Jeff Konnen<br><a href="http://map.geoportal.lu">http://map.geoportal.lu</a><br><br><br>