[mapserver-users] WMS Server and Custom ESPG code

Donald Kerr donald.kerr at dkerr.co.uk
Fri Nov 1 12:28:58 PDT 2013


Brian,

 

My layers are in EPSG:27700 and I can successfully re-project to
EPSG:900913. I have the following set up:

 

In map file:

 

CONFIG "PROJ_LIB" "d:/mapserver/proj4"

PROJECTION

                "init=epsg:27700"

END # PROJECTION

 

WEB

                METADATA

                                # WMS

                                                "wms_title" "WMS Title"

                                                "wms_onlineresource"
"http://localhost/mapserver/mapserv.asp?"

                                                "wms_srs" "EPSG:27700
EPSG:900913" #Additional projections do not need to be set in LAYER if set
here

                                                "wms_enable_request" "*"

                                                "wms_abstract" "Abstract" 

                                                "wms_extent" "0 0 670000
1230000"

                                                "wms_feature_info_mime_type"
"text/plain"

                                                "wms_feature_info_mime_type"
"text/html"

                                                "wms_feature_info_mime_type"
"application/vnd.ogc.gml" # &info_format=application/vnd.ogc.gml

                END # METADATA

END # WEB

 

In the layer:

 

METADATA

                # WMS

                "wms_title" "MyTitle"

                "wms_extent" "0 0 670000 1230000"

                "wms_srs" "epsg:27700"

END # METADATA

 

PROJECTION

                "init=epsg:27700"

END # PROJECTION

 

Hopefully you can pick through the above to make yours work.

 

Regards,

 

Donald

 

 

From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Brian Fischer
Sent: 01 November 2013 18:41
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] WMS Server and Custom ESPG code

 

I am trying to use MapServer 6.2.1 as a WMS server with a custom projection
and espg code, but I keep getting this error message.
msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be
valid for all requested layers.

 

Is this supported?  I have followed these steps.

1)      Defined the custom projection with a new espg code in
\ms4w\proj\nad\epsg

2)      In the mapfile, I added the reference to the Proj (CONFIG "PROJ_LIB"
"E:/ms4w/proj/nad")

3)      Defined the new espg in the Web, Projection, Layer objects of the
mapfile.

4)      Verified the mapfile works using the shp2img utility

 

Has anyone else go this to work?  

Thanks!

Brian

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20131101/7ee8e390/attachment.html>


More information about the mapserver-users mailing list