[mapserver-users] Problems with Google 900913 Projection and WMS Layers

Bill Thoen bthoen at gisnet.com
Tue Mar 17 17:47:05 EDT 2009


I'm trying to get my WMS server to produce WMS layers for an OpenLayers 
application I'm building that uses some Google map layers. But I'm 
getting no results. DEBUG set to ON in my mapfile produces the following 
errors (this is the last three lines of the log file:
[Tue Mar 17 15:16:28 2009].567265 msProcessProjection(): Projection 
library error. no options found in 'init' file
[Tue Mar 17 15:16:28 2009].578247 msProcessProjection(): Projection 
library error. no options found in 'init' file
[Tue Mar 17 15:16:28 2009].603064 msProcessProjection(): Projection 
library error. no options found in 'init' file

I did put the definition for the Google CRS in /usr/share/proj/defs as:

# Google's spherical mercator projection
<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 
+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs <>

So could someone here clue me in to what's wrong? What's the 'init' file 
and what do I need to put in it? I'm on a Linux system with mapserver 
set up like so:
MapServer version 5.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER 
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=EPPL7 
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Below is my mapfile if you want to see it.
TIA,
- Bill Thoen

---
MAP
   CONFIG MS_ERRORFILE "/var/www/html/tmp/ms_errors.txt"
   DEBUG ON
#  EXTENT -102.39 36.81 -94.44 40.13
   EXTENT -20037508.34  -20037508.34  20037508.34  20037508.34
   IMAGECOLOR 255 255 255
   SHAPEPATH /var/www/vfm/
   FONTSET /var/www/maps/fonts/fonts.txt
   SYMBOLSET /var/www/maps/symbols/symbols.txt

   OUTPUTFORMAT
      NAME 'AGG'
      DRIVER "AGG/PNG"
      MIMETYPE "image/png"
      IMAGEMODE RGB
      EXTENSION "png"
   END

   WEB
      IMAGEPATH "/var/www/html/tmp/"
      IMAGEURL "/tmp/"
      METADATA
         "wms_title" "VFM Data Layers"
         "wms_onlineresource" 
"http://xxx.xxx.xxx.xxx/cgi-bin/mapserv?map=/var/www/html/vfm/ms.map&"
         "wms_srs" "EPSG:4326 EPSG:900913"
      END
   END

   PROJECTION
      "init=epsg:900913"
   END
   UNITS METERS

   LAYER
      NAME "states"
      METADATA
         "wms_title" "US State boundaries"
         "wms_srs" "EPSG:32614 EPSG:4326 EPSG:900913"
      END
      TYPE POLYGON
      STATUS ON
      DATA ../maps/data/states
      CLASS
         NAME "US States"
         STYLE
            OUTLINECOLOR 0 0 0
            WIDTH 2
         END
      END
      PROJECTION
         "init=epsg:32614"
      END
   END

   LAYER
      NAME "counties"
      METADATA
         "wms_title" "County Boundaries"
         "wms_srs" "EPSG:4269 EPSG:4326 EPSG:900913"
      END
      TYPE POLYGON
      STATUS ON
      DATA ../maps/data/County_tiger_2007_region
      CLASS
         NAME "County Boundaries"
         STYLE
            OUTLINECOLOR 128 128 128
            COLOR 255 255 192
            WIDTH 1
         END
      END
      PROJECTION
         "init=epsg:4269"
      END
   END
END




More information about the mapserver-users mailing list