Need help with WMS and Projections

Ken Sanderson ken at SANDNARROWS.COM
Thu Dec 2 19:30:12 EST 2004


Hello,

I am trying to get my head around how remote WMS layers work with
projections and hoping that someone here can steer me in the right
direction.

Here is how I have assumed it works. My client goes to a remote WMS layer
and first asks for the layer in the projection of the client, if it doesnt
support that it looks through the SRS tags of the WMS layer and finds the
first one that it understands, by understands I mean thats included in my
EPSG file, requests the image and my mapserver reprojects it to the
projection my client is using.

Thats what I thought, but using a WMS layer has drawn this into question,
so is this true or not?

Here is what has brought up the problem.

I have two clients. One is in a projection of 4326 and another 42304 (LCC
Canada). When I load a specific WMS layer it works in 4326, but would not
work in 42304. Here is the SRS info from the remote WMS layer:

                        <SRS>EPSG:102190</SRS>
   <SRS>EPSG:42102</SRS>
   <SRS>EPSG:3005</SRS>
   <SRS>EPSG:4269</SRS>
   <SRS>EPSG:4326</SRS>
   <SRS>EPSG:26708</SRS>
   <SRS>EPSG:26709</SRS>
   <SRS>EPSG:26710</SRS>
   <SRS>EPSG:26711</SRS>
   <SRS>EPSG:26712</SRS>
   <SRS>EPSG:26908</SRS>
   <SRS>EPSG:26909</SRS>
   <SRS>EPSG:26910</SRS>
   <SRS>EPSG:26911</SRS>
   <SRS>EPSG:26912</SRS>
   <SRS>EPSG:32608</SRS>
   <SRS>EPSG:32609</SRS>
   <SRS>EPSG:32610</SRS>
   <SRS>EPSG:32611</SRS>
   <SRS>EPSG:32612</SRS>

In my thinking since I have a number of these in my EPSG file,
specifically 4326, than I should have no problem loaded the WMS layer into
my client, regardless of what projection my client was using.

In order to get this to work in both of my clients I had to add a new
projection to my EPSG file. 102190 is BC Albers 42102 projection. As
102190 was the projection listed in the bounding box tag, I simply copied
the 42102 and put a new one into my EPSG file with the number 102190.
Works fine now. While this is working for me, I dont think its really a
good solution as I cant be adding new entries to my EPSG file for every
WMS layer my users may want to load.

Sorry for this being long, but I really wanted to give all the details.
How this has worked out has made me think my prior beliefs to how
projections with remote WMS layers worked are wrong. So my question is,
how do they work if they dont work the way I thought they did?

Thanks,

Ken



More information about the mapserver-users mailing list