proj: your cryptic geographic friend

I do a lot of work with UTM survey locations, and quite often I want to have them stored in my GPS. I used to rely on a powerful but oh-so-clunky Windows application called Corpscon, but I really didn’t want to be limited to Windows machines, and Corpscon really only works for North America.

And then I discovered proj. While it has a pretty hideous command-line syntax, the output matches Corpscon to the sixth decimal place. Say you had a waypoint stored (for Southern Ontario, UTM Zone 17, NAD83) like this:

4843744 443025 Goderich

that is, UTM northing,easting, followed by label.

To convert this to geographic coordinates, you’d invoke invproj (which goes from UTM to geographic) like this:

invproj -E -r -f "%.6f" +proj=utm +zone=17 +datum=NAD83

and it would spit out:

4843744 443025 -81.707611 43.744546 Goderich

Columns 3 and 4 are the geographic coordinates – 43° 44′ 40.37″ N, 81° 42′ 27.40″ W in more familiar notation – which is in fact a location between Brock St and Newgate St in Goderich, Ontario.

With a Unix box, proj and gpsbabel, I’m set for all my coordinate conversions.

5 comments

  1. Hi,

    Hope all is well. I was looking for a way to convert some data coordinates to Lat and Long and I found your blog.
    The data I was trying to use are XCOORD – Easting in MTM NAD 27(3 degree) Projection & Lat and Long and YCOORD – Northing in MTMNAD 27(3 degree) Projection & Lat and Long. ( all in Toronto area). example: 326711.0600, 4846900.0240.

    I am looking for a way to convert them to general Lat and Long in degrees. I saw this post regarding Proj which seems to be doing exactly what I am looking for but I do not know how I should use it/run it?

    I would really appreciate it if you could please help me regarding this issue. Thank you in advance.

  2. Hi Amar —

    If you still want to use proj, you can feed it coordinates like this:

    echo 4846900.0240 326711.0600 Somewhere | invproj -E -r -f "%.6f" +init=epsg:2019

    The init command is a shorcut to load predefined settings, and 2019 is the EPSG code for the MTM coordinate system that Toronto uses. Here is an article on my other blog that shows an easier, but more software-heavy way of doing this. The other blog has more geo stuff, too.

    Looks like your location is on Sophia Drive.

Leave a comment

Your email address will not be published. Required fields are marked *