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

Marcos Cobeña marcoscobena at GMAIL.COM
Wed Jun 28 07:28:12 EDT 2006


Hi Frank,

Thank you so much for your help, I tried that but, eventhough it
doesn't crash anymore, it still doesn't paint the shapes.

Under ArcView, my shapes (SHP) are using this projection:

"+proj=longlat +ellps=WGS84 +no_defs"

, which, in my epsg projection file used, corresponds to:

"
# Unknown datum based upon the WGS 84 ellipsoid
<4030> +proj=longlat +ellps=WGS84 +no_defs  no_defs <>
"

Why then I still don't see shapes painted?

Just in case, my MAP file:

"
# DGIS_12c.map
#
MAP
	NAME DGIS
	STATUS ON
	SIZE 800 475
	# "Huelva, Spain " lat=37.258335, lon=-6.9508333
	#
	EXTENT -180 -90 180 90 # 187889.12817030 4092316.51133811
197493.65136571 4099997.10096501 # 36.258335 -7.9508333 38.258335
-5.9508333
	UNITS METERS
	SHAPEPATH "Data"
	IMAGECOLOR 255 255 255
	IMAGETYPE PNG
	CONFIG "PROJ_LIB" "C:\Archivos de programa\Apache Software
Foundation\Apache2.2\cgi-bin\DGIS\Data\Proj" # "C:\Documents and
Settings\Marcos\Escritorio\Temporal\Sistema de Información Geográfica
de Doñana (DGIS)\ms4w_2.0\ms4w\proj\nad"
	
	WEB
		METADATA
			"wms_title" "Sistema de Información Geográfica de Doñana (DGIS)"
			# http://localhost:8080/cgi-bin/DGIS/mapserv.exe?map=DGIS_12c.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
			#
			"wms_onlineresource"
"http://localhost:8080/cgi-bin/DGIS/mapserv.exe?map=DGIS_12c.map&"
			"wms_srs" "EPSG:4326" # "EPSG:4269 EPSG:4326"
		END
	END
	
	PROJECTION
		"init=EPSG:4326"
	END
	
	LAYER
		NAME "12c_linea"
		TYPE LINE
		STATUS ON
		DATA Data/12c/12c_linea
		CLASS
			NAME "12c_linea"
			COLOR 0 0 0
		END
		METADATA
			"wms_title" "12c_linea"
			# "wms_srs" "EPSG:4326 EPSG:4030"
			"wms_format" "image/png"
		END
	END
"

Thanks in advance.

Regards,

2006/6/22, Frank Warmerdam <warmerdam at pobox.com>:
> 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
>
>


-- 
Marcos - http://www.youcannoteatbits.org


More information about the mapserver-users mailing list