[Mapserver-users] WMS client - multiple entries in "wms_srs"

Havard Tveite havard.tveite at nlh.no
Thu Feb 26 09:59:19 PST 2004


I finally found out the cause of my problems.
On my platform, in order for Mapserver to be able to determine
that the map output projection is in the "wms_srs" list (and
choose that projection when requesting the WMS layer), the map
output projection has to be specified using lowercase, that is
"init=epsg:32633" and *not* "init=EPSG:32633".
At the same time, the projection name in the "wms_srs" list
has to be specified using upper case, that is
"wms-srs" = "EPSG:4326 EPSG:32633 ..."
and *not*
"wms-srs" = "epsg:4326 epsg:32633 ..."
(I do not use a PROJECTION object in the WMS layer specification)

I also had to make two copies of the proj.4 epsg file. One called
EPSG and the other epsg!

Is it only me?

Haavard

Daniel Morissette wrote:

> Havard Tveite wrote:
> 
>> Using recent versions of Mapserver CVS, Proj.4, ... I am a little
>> confused as to the the use of "wms_srs" in the METADATA of a WMS-layer.
>>
>> LAYER
>>   CONNECTIONTYPE WMS
>>   METADATA
>>   "wms_srs" "EPSG:4326 EPSG:32633 EPSG:27394 EPSG:4267 EPSG:4269"
>> ...
>>
>> It seems to me that the first entry on the "wms_srs" list is
>> always choosen by Mapserver when doing the WMS request.
>>
>> I thought that the point of having a list in "wms_srs" was that
>> Mapserver could choose among these projections depending on the
>> projection of the output map.
>> This way, raster reprojection could in many cases be avoided,
>> producing nicer output maps.
>>
>> What is the point of having a list of projections in "wms_srs"?
>> Is it for future use?
>>
> 
> That's right, the wms_srs contains a list of SRS supported by the remote 
> WMS server, and MapServer will choose the one that matches the map 
> output projection if it can.  If it can't find a match, then it falls 
> back on using the first one and reprojects the raster image that it gets 
> from the remote WMS.
> 
> If the first one is always used, it could be that the output map 
> projection doesn't match any of the EPSG codes that are in your list. 
> Also note that MapServer can't do reverse lookups of EPSG numbers, so if 
> you define your map's output projection using the native PROJ parameters 
> (e.g. "proj=..." "lat_0=..."lon_0= ....) then MapServer won't be able to 
> match that to an EPSG code: you have to use "init=epsg:xxxx" as your 
> projection definition.
> 
> Of course there is always the possibility that a bug was introduced in 
> the recent code???
> 
> Daniel

-- 
Håvard Tveite
Department of Mathematical Sciences and Technology
Agricultural University of Norway
Drøbakveien 14, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64948857 Fax: +47 64948810 http://www.nlh.no/imt



More information about the MapServer-users mailing list