To set up projections you must define two projection objects: one for the output image (in the MAP object) and one for each layer (in the LAYER objects) to be projected. MapServer relies on the Proj.4 library for projections. Projection objects therefore consist of a series of PROJ.4 keywords, which are either specified within the object directly or referred to in an EPSG file. An EPSG file is a lookup file containing projection parameters, and is part of the PROJ.4 library.
The following two examples both define the same projection (UTM zone 15, NAD83), but use 2 different methods:
Example 1: Inline Projection Parameters
PROJECTION
"proj=utm"
"ellps=GRS80"
"datum=NAD83"
"zone=15"
"units=m"
"north"
"no_defs"
END
Example 2: EPSG Projection Use
PROJECTION
"init=epsg:26915"
END
Note
This refers to an EPSG lookup file that contains a ‘26915’ code with the full projection parameters. “epsg” in this instance is case-sensitive because it is referring to a file name. If your file system is case-sensitive, this must be lower case, or MapServer (Proj.4 actually) will complain about not being able to find this file.
Note
See http://spatialreference.org/ref/epsg/26915 for more information on this coordinate system.
The next two examples both display how to possibly define unprojected lat/longs (“geographic”):
Example 3: Inline Projection Parameters
PROJECTION
"proj=latlong"
"ellps=WGS84"
"datum=WGS84"
END
Example 4: epsg Projection Use
PROJECTION
"init=epsg:4326"
END