Monthly Archives: August 2011

Projections for Programmers – One Projection (Part 2)

In my last post,  we examined the WKT representation of a UTM projection, and went into some details about the GEOGCS portion of the projection.  In this post, we’ll wrap things up by looking at the rest of the projection.   Here’s our WKT with the UNIT section  for the projection itself highlighted.

PROJCS["NAD83 / UTM zone 14N",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]
            ],
            AUTHORITY["EPSG","6269"]
        ],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]
        ],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]
        ],
        AUTHORITY["EPSG","4269"]
    ],
    UNIT["metre",1,
       AUTHORITY["EPSG","9001"]
    ],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-99],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    AUTHORITY["EPSG","26914"],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH]
]

Just like the GEOGCS, the PROJCS also has its own UNIT setting.   Unlike GEOGCS’s “degree” units, in this case it’s “metre” (not “meter” because EPSG is an international standard, and everywhere else but the good ol’ USA spells it “metre”).   The conversion ratio is “1” since the standard measure of linear units for EPSG is meters, and 1 metre == 1 meter.  And if you’ve worked with UTM projections like this one, you know that all the measurements are in meters.

Let’s move on down the WKT to  PROJECTION.

PROJCS["NAD83 / UTM zone 14N",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]
            ],
            AUTHORITY["EPSG","6269"]
        ],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]
        ],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]
        ],
        AUTHORITY["EPSG","4269"]
    ],
    UNIT["metre",1,
       AUTHORITY["EPSG","9001"]
    ],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-99],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    AUTHORITY["EPSG","26914"],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH]
]

The PROJECTION element tells you the actual name of the projection.  This is a UTM projection, where the projection type is Transverse Mercator.  The format of this string is also arbitrary, although the OGC WKT and the ESRI PRJ file happen  to use the string “Transverse_Mercator” to define this projection.    I’ll go into some of the properties of a Transverse Mercator projection when I explain the PARAMETER entities, but if you need  even more information, you can read all about Tranverse Mercator on Wikipedia.

Most projections have something variable about them, based on where and how they are applied.   In projection parlance, these are projection parameters which are now highlighted in our WKT:

   PROJCS["NAD83 / UTM zone 14N",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]
            ],
            AUTHORITY["EPSG","6269"]
        ],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]
        ],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]
        ],
        AUTHORITY["EPSG","4269"]
    ],
    UNIT["metre",1,
       AUTHORITY["EPSG","9001"]
    ],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-99],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    AUTHORITY["EPSG","26914"],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH]
]

The projection parameters in this WKT are specifically for a Transverse Mercator projection, and will tell you (or your code) how to interpret the projection.   Other types of projections  have their own parameters, so I’ll go over each parameter for this projection briefly:

  • latitude_of_origin is the latitude where the X-axis of the projection is centered.
  • central_meridian is the longitude where the Y-axis of this projection is centered. In my example, UTM zone 14 (N or S) is centered at the 99 west longitude.
  • scale_factor is an alteration of the normal 1:1 scale in the projection measurements which reduces distortion across the projection.
  • false_easting is a somewhat arbitrary big number  that has been added to the original X-axis coordinates to prevent the map user from having to work with negative numbers.
  • false_northing is the  amount of units the origin was moved north to prevent coordinates with negative numbers.  Due to the way the UTM projection is defined, north UTM zones don’t need any false_northing.

OK, let’s wrap up this projection by looking at the AXIS elements.

PROJCS["NAD83 / UTM zone 14N",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]
            ],
            AUTHORITY["EPSG","6269"]
        ],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]
        ],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]
        ],
        AUTHORITY["EPSG","4269"]
    ],
    UNIT["metre",1,
       AUTHORITY["EPSG","9001"]
    ],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-99],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    AUTHORITY["EPSG","26914"],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH]
]

The AXIS values tell you which way the coordinate axes point. The x axis in a UTM projection is called Easting and points to the east. The y axis is called Northing and points north.

Whew – that’s it!  I hope this explanation of the various parts of a projection keeps you from getting bleary eyes the next time you have to deal with one.    Although these postings used a NAD 83 UTM 14N projection as an example, you’ll find that other projections share much in common with this one.