Changing Output Projection

Bill Thoen bthoen at GISNET.COM
Thu Dec 21 15:40:55 EST 2006


I'm pulling a polygon layer from Postgis and displaying it in MapServer, 
but I can't seem to change the output projection. The polygon layer's 
native coordinate system is WGS84, and when I check MapServer with th 
e-v switch it says it supports PROJ. The unprojected map displays fine 
if I use decimal degrees, but it seems to be ignoring my PROJECTION 
settings the map file. Can someone tell me what's wrong? Here's the map 
file:

MAP
   SIZE 600 600
#  EXTENT -125 35 -66 50
   EXTENT -300000 -100000 300000 100000
   IMAGECOLOR 180 180 250

   UNITS METERS

   PROJECTION
      "proj=utm"
      "ellps=GRS80"
      "datum=NAD83"
      "zone=15"
      "units=m"
      "north"
      "no_defs"
   END

   WEB
      TEMPLATE counties.html
      IMAGEPATH "/var/www/html/tmp/"
      IMAGEURL "/tmp/"
   END

   LAYER
      NAME counties
      TYPE POLYGON
      STATUS DEFAULT
      CONNECTION "user=*** password=*** dbname=spatial1 host=localhost 
port=5432"
      CONNECTIONTYPE POSTGIS
      DATA "the_geom from counties"
      LABELITEM 'county'
      LABELMAXSCALE 5000000
      CLASSITEM 'county'
      CLASS
         NAME 'US Counties'
         OUTLINECOLOR 100 100 100
         COLOR 255 255 204
         LABEL
            SIZE LARGE
            COLOR 0 0 255
            OUTLINECOLOR 255 255 255
            MINFEATURESIZE 10
         END
      END
      PROJECTION
         "proj=utm"
         "ellps=GRS80"
         "datum=NAD83"
         "zone=15"
         "units=m"
         "north"
         "no_defs"
      END
   END
END
~



More information about the mapserver-users mailing list