[MapProxy] WMS-C as a source
Jeff Konnen
jaykayone at gmail.com
Tue Mar 6 11:21:56 EST 2012
Hi,
I'd like to use mapproxy to reproject a WMS-C service and use it as a WMS.
Is that possible?
I tried this conf:
*services:
demo:
kml:
tms:
# needs no arguments
wms:
srs: ['EPSG:2169']
image_formats: ['image/jpeg']
md:
# metadata used in capabilities documents
title: MapProxy WMS Proxy
abstract: This is the fantastic MapProxy.
online_resource: http://mapproxy.org/
contact:
person: Your Name Here
position: Technical Director
organization:
address: Fakestreet 123
city: Somewhere
postcode: 12345
country: Germany
phone: +49(0)000-000000-0
fax: +49(0)000-000000-0
email: info at omniscale.de
access_constraints:
This service is intended for private and evaluation use only.
The data is licensed as Creative Commons Attribution-Share Alike 2.0
(http://creativecommons.org/licenses/by-sa/2.0/)
fees: 'None'
layers:
- name: Ortho
title: Ortho
sources: [ign_ortho_tile]
grids:
mygrid:
srs: EPSG:310024802
bbox: [-1048576,3670016,2097152,6815744]
bbox_srs: EPSG:310024802
origin: nw
res: [2048,1024,512,256,128,64,32,16,8,4,2,1,0.5,0.25,0.125,0.0625]
format: image/jpeg
sources:
ign_ortho_tile:
type: tile
url:
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
format: image/jpeg
grid: mygrid
*
but I keep getting this error when starting the service:
(mapproxy)[root at todd_ign mymapproxy]# mapproxy-util serve-develop
mapproxy.yaml -b 0.0.0.0
[2012-03-06 17:02:10,661] mapproxy.config - INFO - reading: mapproxy.yaml
[2012-03-06 17:02:10,685] mapproxy.config - WARNING - unknown 'format' in
grids.mygrid
[2012-03-06 17:02:10,685] mapproxy.config - WARNING - unknown 'format' in
sources.ign_ortho_tile
[2012-03-06 17:02:10,766] mapproxy.system - INFO - using libproj for
coordinate transformation
[2012-03-06 17:02:10,779] mapproxy.system - INFO - loading proj data from
/usr/share/proj/
Traceback (most recent call last):
File "/home/mapserver/mapproxy/bin/mapproxy-util", line 9, in <module>
load_entry_point('MapProxy==1.3.0', 'console_scripts',
'mapproxy-util')()
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/script/util.py",
line 319, in main
commands[command]['func'](args)
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/script/util.py",
line 72, in serve_develop_command
app = make_wsgi_app(mapproxy_conf, debug=options.debug)
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/wsgiapp.py",
line 118, in make_wsgi_app
services = conf.configured_services()
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py",
line 204, in configured_services
return self.services.services()
File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
self.gen.throw(type, value, traceback)
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/util/__init__.py",
line 42, in local_base_config
yield
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py",
line 204, in configured_services
return self.services.services()
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py",
line 1113, in services
new_services = creator(service_conf or {})
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py",
line 1188, in wms_service
root_layer = self.context.wms_root_layer.wms_layer()
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/util/__init__.py",
line 86, in wrapper
func.__memoize_cache[key] = func(*args)
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py",
line 1003, in wms_layer
layers.append(WMSLayerConfiguration(layer_conf,
self.context).wms_layer())
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/util/__init__.py",
line 86, in wrapper
func.__memoize_cache[key] = func(*args)
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py",
line 1006, in wms_layer
this_layer = LayerConfiguration(self.conf, self.context).wms_layer()
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/util/__init__.py",
line 86, in wrapper
func.__memoize_cache[key] = func(*args)
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py",
line 1041, in wms_layer
map_layer = self.context.sources[source_name].source()
File
"/home/mapserver/mapproxy/lib/python2.6/site-packages/mapproxy/config/loader.py",
line 784, in source
format = file_ext(params['format'])
KeyError: 'format'
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?
I could not try it out.
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;-)):
http://t.co/2Ghb1WOS
Thanks in advance and best regards
Jeff
--
Jeff Konnen
http://map.geoportal.lu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapproxy/attachments/20120306/5ba904cd/attachment.html
More information about the MapProxy
mailing list