Tags:
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Projections and Coordinate Systems for GIS: A new perspective on old ideas.

Projections and Coordinate Systems for GIS:  A new perspective on old ideas.
(Or, GIS Professionals Should Consider That A Lot Of Our Constants Are, Increasingly, Not So Constant.)

“I am constant as the northern star,
Of whose true-fix’d and resting quality
There is no fellow in the firmament.”

In his play Julius Caesar, Shakespeare has his title character say that.  To someone living in Caesar’s time, or even in Shakespeare’s, that the North Star is indeed sufficiently “constant” as to provide those who follow it with a “fixed” bearing was taken to be axiomatic.  Our notion that the North Star is fixed is, however, one of those things that went out the window the more science started to investigate things.

We know several things now which indicate to us that “constant as the northern star” is an expression somewhat at odds with reality.  We know, for example, that stars are not fixed in location, but actually hurtle through space at tremendous speed.  We also know that our perception of where the North Star, or any other star, is located is based on certain properties of the Earth, which provides us our vantage point.  The Earth turns – and the North Star, even though it still appears nearly fixed, does appear to move a small amount because of this.  But also, the Earth’s rotational axis actually moves over the long term.  The axis precesses, or spins in a circle, somewhat like the axis of a spinning top or gyroscope turns.  The axis also nutates, or wobbles as it spins in that precessional circle.  Over time, precession and nutation affect where we see stars relative to the Earth.  What that means is that over longer periods of time, the North Star will be quite obviously less “constant”.

In geomatics, we have long taken for granted the fixed nature of our referents.  The Equator, for example, does not move.  The North and South Pole do not move.  We have defined them to be at particular locations, and there they stay.  Really Caesar should have said “I am constant as the Equator.”

But perhaps we should recognise that, as human activities concern themselves with things that take place off the surface of the Earth, the question of what properly counts as a “constant” reference point will be more openly in question.  Even the Earth, after all, is not “constant” – it is a ball in space whizzing around its star, which is in turn whizzing around the central point of the Milky Way Galaxy, which is, in turn, if one believes the physicists, whizzing away from the primordial location of the Big Bang.

What’s this got to do with GIS, you may ask?  Already we are seeing numerous issues come up that relate to the question of changing reference points.

Airplane navigators, for example, use one system of coordinates that are relative to the Earth (though in a slightly different way than we are used to understanding that) and one system of coordinates that relate to their own vehicle.  The Earth-based coordinate system is called the NED (North-East-Down) system – it’s a lot like our latitude-longitude-altitude system (measured in degrees-degrees-meters), except that the navigators are more interested in how far down from the plane the Earth is than how far up from the Earth the plane is.  On the Earth, we call our variant of this same system ENU (East-North-Up).  The reason I mention the difference in nomenclature, however, is to illustrate the point that we care most about using where we actually are as a reference point, and when that’s not the surface of the earth, it is a given we will start using a coordinate system that accords more with where we actually find ourselves.

In addition to NED, airplane navigators use angles of rotation, based on the rotation of the plane at the plane’s NED location, to gauge the plane’s orientation towards the Earth’s coordinates.  Rotation in the x-axis direction is called “roll”, in the y-axis direction is called “pitch”, and in the z-axis direction is called “yaw”.  What I’m pointing out here is that airplane navigators are typically using both an Earth-based coordinate system to locate their plane and a plane-based coordinate system to transform those coordinates into coordinates relevant to those on the plane.  Aeronautical GIS applications, of course, would need to model this transformation.

Our normal GIS experience, even now, as we continue to bravely make our way into the 21st Century, remains a 2D and latitude-longitude-(maybe altitude) experience.  Our understanding is that we don’t really need to consider changing reference points.  But that is an understanding that is bound not to last for long.  Those who fly planes off the Earth’s surface already can see that.  But also, those who model the entire Earth geomatically are beginning to do so.

Certainly we have all had an opportunity by now to note the existence of Google Earth, and perhaps to use it.  The vision it gives us of a spherical planet is certainly missing from most GIS.  But there really isn’t any reason we shouldn’t be trying to model this more generally, as the tools are reasonably easily learned.

The “Earth Centered-Earth Fixed” coordinate system (or ECEF) provides an alternative method, using the three dimensions, of locating objects with respect to the Earth.  The center of the Earth and three axes emanating out from that center are the “constant” referents of this system.  The axes run from the Earth’s center through latitude 0 / longitude 0 (the X axis of the system), latitude 0 / longitude 90 E (the Y axis) and the North and South Poles (the Z axis).

One of the most important reasons for learning how to translate latitude-longitude-altitude coordinates into ECEF XYZ coordinates is that it makes it possible to make a flat map of how someplace looks from an angle.  I have an example of this below.  The first picture demonstrates how Spain looks in a plate carrée flat map representation.  The second shows how Spain looks from the basic vantage point of the ECEF X axis point (latitude 0 and longitude 0).  Spain bends around because it’s not on a flat Earth.

(A quick aside here – when I presented a copy of this article for a quick lookover to someone, she asked “what’s the error on this projection?”  I was surprised to get this question, though in the end it’s a good question to ask, because it helps me explain something further.  Strictly speaking, there is no error to the conversion, because latitude-longitude-altitude measures 3D reality – though a 2D map does inevitably distort latitude, longitude and altitude, the measures of latitude, longitude and altitude themselves contain no error themselves, except if we slightly mismeasure them in the real world.  Likewise, when you convert from latitude-longitude-altitude to ECEF XYZ coordinates, this involves no error because the ECEF coordinates themselves also represent the 3D reality, not merely any given 2D flat-mapping of those coordinates.  Any particular flat representation of the ECEF coordinates of course involves distortion, but because we can move around to see “different sides” of the “ECEF-projected Spain”, we don’t really experience it as “error”, any more than looking at a globe from one side does.  Because the globe is 3D, and because we can move it, and/or our view of it, around, we experience it as a reasonably accurate scale model of the Earth.  This is part of the advantage of moving to this kind of system.)

Figure 1.

Before Transformation

Figure 2.

After Transformation

It is possible to get a vantage point from any location near the Earth by knowing your ECEF location (which can be above the Earth, of course) and also your roll-pitch-yaw orientation to that location.

What is the most interesting about this is that the conversion of latitude-longitude-altitude to ECEF largely uses the same kind of mathematical methodology that is required to do a roll-pitch-yaw transformation.  Both conversions involve the use of “direction cosines” (or the related angular/trigonometric concept of sines) to achieve a spherical rotation.  The coordinates can be easily calculated in a spreadsheet – or within a GIS attribute table.

I include with this article my spreadsheet Geo2XYZ.xls , which performs the necessary calculations to convert latitude-longitude-altitude into ECEF XYZ and then transforms those coordinates according to a given set of roll-pitch-yaw angles.  If you click inside the cells to see the formulas used, you will see that these formulas are not very complicated, and can be easily learned.

Hopefully that will give everyone the heads-up for skills they may need as the 21st Century continues!

The main references I used which are accessible for other GIS professionals (and to some extent, the general public) are:

http://read.pudn.com/downloads85/ebook/326017/Fundamentals%20of%20Global%20Positioning%20System%20Receivers/booktext04.pdf

http://www.hydrometronics.com/downloads/ECEF%20for%20Blue%20Marble%20with%20Notes.pdf

http://www.gmat.unsw.edu.au/snap/gps/clynch_pdfs/coorddef.pdf

2 comments on "Projections and Coordinate Systems for GIS: A new perspective on old ideas."

  1. Jon Murphy says:

    Great article Zach. The screen shots you used. Were those created using a program that you wrote? Can you tell us a little about it?

    1. Zachary Klaas says:

      This is actually part of a larger project I’m currently working on to code GIS in a simpler language. I produced the applications in the screenshots using the compiler for a language called “Simple”, which is actually written for children to use. (I’ll put the link here documenting the language I used in case people are interested in it – http://www.simplecodeworks.com/website.html – but be warned, the website is written with teenagers and pre-teens in mind, rather than the typical GIS professional.) I chose that language specifically because the coding style is made as simple as it can be, but also because the language is written with the power and capacities of C++ underneath it. Thus the language is less hostile to the average user, but also allows more sophisticated programmers access to the commands they would want to use should the “Simple” commands not be sufficient. For what you see here, I did not need any commands from C++, only the ones already provided by Simple. (I’m hoping to write more about what I’m doing with Simple in the future…still preparing materials at this point.)

Have Something to Add? Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Articles

3D Reconstructions of Ancient Cities

As cities grow outwards and upwards over time, we most often forget what lies underneath what is on top. While…

URISA BC

URISA BC – Engage: Make It So With GIS in Community Engagement

What: Engage: Make It So With GIS in Community Engagement Where: Vancouver, BC When: Thursday, 15 June 2017 from 8:00…

COGS NSCC students use Geomatics to explore the history of Black Loyalists & Joggins Fossil Cliff

NSCC students make major impact in two small communities with huge historical significance Students at Nova Scotia Community College’s Centre…