WMS and SRS issue: "Invalid SRS given : SRS must be valid for all requested layers."

Frank Warmerdam warmerdam at POBOX.COM
Thu Jun 22 10:20:49 EDT 2006


Marcos Cobeña wrote:
> Hi all,
> 
> I'm trying to access to a layer made of SHP files, like this one:
...
>         METADATA
>             "wms_title" "12c_linea"
>             "wms_srs" "EPSG:4326" # "EPSG:4031"
>             "wms_format" "image/png"
>         END
>     END
> [...]
> END
> "
> 
> , where I've defined a projection ("init=EPSG:42304") and, for each
> layer, its own SRS ("EPSG:4326"). It works fine, it draws my shape in
> Canada (as expected with projections used).
> 
> Once I change main projection to 4030:
...
> "
> msWMSLoadGetMapParams(): Invalid SRS given : SRS must be valid for all
> requested layers.
> "

Marcos,

I have gone through the WMS validation code, and as I read it, you
either have to list all legal request SRSes in the map's wms_srs metadata
item or in all the requestable layers.  So changing your layer wms_srs
line to:

   "wms_srs" "EPSG:4326 EPSG:4030"

ought to make it work.

The error report isn't actually at the projections code, but rather
in the code that validates what requests are legal according to your
metadata.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-users mailing list