Map Projections & Coordinate Systems

By default the MapServer requires data to all be in the same projection and coordinate system. There is one exception. Features (inline, shapefiles or those defined using MapScript) can be defined in image coordinates. This allows for the placement of logos, copyrights and other things that need to remain in the same place on a map regardless of extent. See the layerObj TRANSFORM parameter for more information. MapServer supports the following coordinate system units: inches, feet, meters, miles, kilometers or decimal degrees. See the mapObj UNITS parameter.

On-The-Fly Projection

MapServer can be compiled with the USGS cartographic projection library PROJ.4. This allows layers to be projected on-the-fly from/to any projection and coordinate system supported by PROJ.4. MapServer provides a simple mechanism to pass coordinates through the PROJ.4 system. To set up projections you must define two projection objects: one for the output image and one for each layer to be projected. Projection objects simply consist of a series of PROJ.4 keywords. Here is an example defining UTM zone 15, NAD83.

      PROJECTION
        "proj=utm"
        "ellps=GRS80"
        " zone=15"
        "north"
        "no_defs"
      END
    
Geographic coordinates are defined as:
      PROJECTION
        "proj=latlong"
      END
    
An HTML version of the EPSG file that comes with the MapServer distribution is available with more examples.

[Homepage]  [Download]  [Documentation]  [Support]  [Gallery]