[MapProxy] Problems configuring MapProxy to serve WMS layer
Jorge Arévalo
jorge.arevalo at deimos-space.com
Tue Nov 15 12:05:03 EST 2011
Hi,
Many thanks for the link. It helped me to solve my problem. The
'supported_srs' option and a couple of things related with my network
configuration did the trick. I finally came with:
services:
wms:
srs: ['EPSG:3785', 'EPSG:4326', 'EPSG:23028']
image_formats: ['image/jpg', 'image/png']
layers:
name: mylayer
title: My layer
sources: [my_cache]
caches:
my_cache:
grids: [GLOBAL_MERCATOR]
sources: [my_wms_source]
format: image/png
request_format: image/png
sources:
my_wms_source:
type:wms
req:
url: http://ip_of_my_mapserver_machine/cgi-bin/mapserv?
layers: mylayer_in_mapserver
map: /path/to/my/mapfile.map
supported_srs:['EPSG:3785', 'EPSG:4326', 'EPSG:23028']
Best regards,
Jorge
2011/11/15 Jaak Laineste <jaak at nutiteq.com>:
> Hello,
> I struggled with similar situation and ended up with following parameter added to source configuration (https://code.google.com/p/maakaart-ee/wiki/MapProxyConf):
>
> supported_srs: ['EPSG:4326']
>
>
> On 14.11.2011, at 18:11, Jorge Arévalo wrote:
>
>> Hello,
>>
>> I'm having problem to make MapProxy render a Mapserver WMS layer. My
>> configuration file looks like this:
>>
>> services:
>> wms:
>> srs: ['EPSG:3785', 'EPSG:4326', 'EPSG:23028']
>> image_formats: ['image/jpg', 'image/png']
>>
>> layers:
>> name: mylayer
>> title: My layer
>> sources: [my_wms_source]
>>
>> sources:
>> my_wms_source:
>> type:wms
>> req:
>> url: http://mydomain/cgi-bin/mapserv?
>> layers: mylayer_in_mapserver
>> map: /path/to/my/mapfile.map
>>
>>
>> Direct queries to mapserver works fine. So, a query like this works:
>>
>> http://mydomain/cgi-bin/mapserv?styles=&map=/path/to/my/mapfile.map&format=image/png&width=800&height=600&bbox=-18.4267,27.3264,-13.0047,29.5457&layers=mylayer_in_mapserver&service=WMS&request=GetMap&srs=EPSG:4326&version=1.1.1
>>
>> The key, I think, is in the bounding box. If I deploy MapProxy with
>> debug activated and try to see my WMS source through the demo app,
>> queries like these are raised:
>>
>> http://mydomain/cgi-bin/mapserv?styles=&map=map=/path/to/my/mapfile.map&format=image%2Fpng&width=800&height=600&bbox=-506.77734375,
>> -266.8359375,370.01953125,190.1953125&layers=mylayer_in_mapserver&service=WMS&request=GetMap&srs=EPSG:4326&version=1.1.1
>>
>> And that query doesn't work, because the bounding box is in a
>> different coordinate system (I guess epsg:3785).
>>
>> How could I control that? The bbox used for WMS queries. I've tried
>> with 'srs' parameter in wms option of 'services' section, but it
>> doesn't work. Any clues?
>>
>> Thanks in advance, and best regards
>>
>> --
>> Jorge Arévalo
>> Internet & Mobility Division, DEIMOS
>> jorge.arevalo at deimos-space.com
>> http://es.linkedin.com/in/jorgearevalo80
>> http://mobility.grupodeimos.com/
>> http://gis4free.wordpress.com
>> http://geohash.org/ezjqgrgzz0g
>> _______________________________________________
>> MapProxy mailing list
>> MapProxy at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapproxy
>
>
--
Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arevalo at deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g
More information about the MapProxy
mailing list