Need help with WMS and Projections

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Mon Dec 6 18:47:54 EST 2004


Ed McNierney wrote:
>
> I've never tried it with EPSG codes I don't have installed, but I
> believe that if you list a series of EPSG codes in the "wms_srs"
> metadata for the WMS client layer, MapServer will select (a) the
> projection that matches its own output projection if available, or (b)
> the first projection it understands.  I always make sure I only list
> projections I know I have installed, so I'm not certain about that.
>

Actually, the rule is: MapServer will select (a) the projection that
matches its own output projection if available in the wms_srs metadata
of the WMS client layer, or (b) fallback on the first projection in the
wms_srs metadata of the WMS client layer and then internally warp the
returned image to match the output projection.

MapServer doesn't do any check in the EPSG list to find out if it
supports a given projection or not. It's realy up to you to list the
SRSes that both your local server and the remote WMS server supports in
the WMS client layer's wms_srs metadata and that's what drives everything.

In your case, the LAYER should look like this:

LAYER
   CONNECTIONTYPE WMS
   CONNECTION "http://some.wms.tld/path/to/thewms?"
   ...

   METADATA
     ...
     "wms_srs" "EPSG:102190 EPSG:42102 EPSG:3005 EPSG:4269 EPSG:4326
EPSG:26708 EPSG:26709 EPSG:26710 EPSG:26711 EPSG:26712 EPSG:26908
EPSG:26909 EPSG:26910 EPSG:26911 EPSG:26912 EPSG:32608 EPSG:32609
EPSG:32610 EPSG:32611 EPSG:32612"
     ...
   END
END

If EPSG:102190 was not in your epsg file (it is not there by default)
then you should either not include it in the wms_srs metadata, or add it
  to your local epsg file.

HTH

Daniel
--
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-users mailing list