[mapserver-users] WMS Server and Custom ESPG code

Brian Fischer bfischer at houstoneng.com
Fri Nov 1 14:19:44 PDT 2013


Thanks for the reply!  It looks like I have everything setup right but seems like MapServer is not reading my espg file in the proj folder.  Here's the espg definition and here's my mapfile.  Or maybe it is something with the extent being requested with the SRS but everything looks right. I'm just trying to display the output image in a web browser to validate it is working.

# Chippewa County Coordinates EPSG:97036
<97306> +proj=lcc +lat_0=44.581111111111 +lon_0=-91.29444444444444 +lat_1=45.141666666666 +lat_2=44.813888888888 +x_0=197000 +y_0=0.0 +ellps=GRS80 +datum=NAD83 +k_0=1.0000391127 +a=6378412.542 +b=6357027.8561403 +f=298.270107115315 +to_meter=0.3048006096012192 +no_defs <>

MAP
                NAME 'Basemap'
                SIZE 800 650
                STATUS ON
                EXTENT 68036 80345 326435 279563         #Extent is needed for feature report
                UNITS FEET
                CONFIG "PROJ_LIB" "E:/ms4w/proj/nad"
                INCLUDE "geomoose_globals.map"

                WEB
                                METADATA
                                                'wms_title' 'Basemap'
                                                'wms_srs' 'epsg:97306'
                                                'wms_enable_request' '*'
                                END
                END
                    PROJECTION
                                                'init=epsg:97306'
                   END

                LAYER # County Boundary
                                NAME 'County_Boundary'
                                DATA 'data/county'
                                STATUS ON
                                TYPE POLYGON
                                PROJECTION
                                                'init=epsg:97306'
                                END
                                METADATA
                                                'wms_srs' 'epsg:97306'
                                END
                                CLASS
                                                NAME 'County Boundary'
                                                STYLE
                                                                WIDTH 5
                                                                COLOR -1 -1 -1
                                                                OUTLINECOLOR 100 100 100
                                                END
                                END
                END # County Boundary
END

Here's the error I get:
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException code="InvalidSRS">
msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be valid for all requested layers.
</ServiceException>
</ServiceExceptionReport>

Brian Fischer
Principal | GIS Project Manager
Houston Engineering, Inc.
O 763.493.4522 | D 763.493.6664 | F 763.493.5572

From: mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Smith, Michael
Sent: Friday, November 01, 2013 2:26 PM
To: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: Re: [mapserver-users] WMS Server and Custom ESPG code

Hi Brian, I have successfully done this as you outline below.

I checked my WMS and they reference c:\ms4w\proj\nad.

In that folder I edited the epsg file

I added the following line to the end of the file:
# ESRI Web Mercator
<102113> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137 +units=m +no_defs

Now I can serve my WMS out as Web Mercator for ArcGIS Online.

===============================
Michael Smith MS GISP
State GIS Manager, Maine Office of GIS
State of Maine, Office of Information Technology
michael.smith _at_ maine.gov 207-215-5530

From: mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Brian Fischer
Sent: Friday, November 01, 2013 2:41 PM
To: mapserver-users at lists.osgeo.org<mailto: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/d3c9bba3/attachment-0001.html>


More information about the mapserver-users mailing list