Proj.4 Projection Library
List Available Projections
- proj -l
Example Projection (Mapserver)
PROJECTION "proj=aea" "ellps=WGS84" "lat_0=10" "lon_0=-90" END
- proj=aea
- name of projection to use - aea is an abbreviation for Albers Equal Area
- ellps=WGS84
- name of ellipsoid (some functions will require an ellipsoid, and some will not)
- lat_0=10
- specifies the latitude of origin as 10 degrees north; the default is 0 degrees if not specified
- lon_0=-90
- specifies the central meridian as -90 degrees (90 degrees West); the default is 0 degrees if not specified
EPSG Codes
You may wish to use EPSG codes (short number sequences) to identify common projections instead of constantly typing out all of the projection parameters. The codes are defined in a text file, commonly named “epsg.” The file contains predefined projections, latitude of origins, ellipsoids, etc…
Examples
# NAD83(HARN) / Arizona Central (ft) <2868> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +to_meter=0.3048 +no_defs <> # NAD83(HARN) / Texas Centric Albers Equal Area <3085> +proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +units=m +no_defs <>
Using EPSG Codes in MapServer
PROJECTION "init=epsg:2868" END
Custom EPSG Codes
Many custom codes are also available. These codes are not included in the default EPSG file, but are included in other files (likely in the same directory as the default EPSG file). Of course, you may create your own custom projections by appending the lines to the end of the epsg file. Remember that this file may be overwritten if you update Proj.4.
Capitalization Issues
When using EPSG codes in MapServer PROJECTION objects, the text epsg should be lowercase. When using EPSG codes for Web Map Server requests using MapServer, the EPSG should be uppercase:
"wms_srs" "EPSG:26910"