Geo Coordinate 

A geocoordinate is a coordinate used in geography (geo = geography). A coordinate is a pair of ordinates (co = pair). An ordinate is a measure of position (ordinate = ordinal number). Informally, a geocoordinate measures a position in the world. A geocoordinate is the point where a vector from the center of the earth (for example) intersects the surface. That is, for a given surface, a two dimensional vector defines a three dimensional point in space. Here we use the matematical notion of theta and phi to define a point and then give its cooresponding GeoCoordinate as lattitude and longitude north or south of the equator (phi=90) and east or west of the prime merridian (theta=0).In this test we will find it convenient to specify ideal points (using degrees) and find their geocoordinates. Note, theta and phi are concepts used for writing this test, not necessarily properties of a geocoordinate.
We can also specify a GeoCoordinate and find the vector that represents it. When we do so we will expect 0 <= theta < 360 and 0 <= phi <=180, though that is just a convention of this test. We assume theta and phi are checked to the precision implied by the number of significant digits written.
We accept some variety of notation. In general, a latitude or longitude can be specified with one, two or three numbers. These are consistently prefixed or sufixed with n, s, e, or w, possibly capitalized, spelt out, or omitted when signed numbers are assumed. Spaces and other punctuation is ignored except that it serves as a separator.
We don't expect to encounter a lat or lon like the following so we don't specify behavior for the following cases other than to say: all possible inputs produce either a well formed geocoordinate, answer null or throw an exception.
A classing example of using geocoordinates is that of finding the greatcircle distance between places on the earth. This, of course, requires factoring in the threedimensional nature of the path, the radius of the earth, and for good accuracy, the variation in radius due to the equatorial bulging (oblateness) of the earth's average surface. Here we compare distances (miles) computed using the WGS84 conventions to those assuming a spherical earth.
These are web resources that were used to produce some of these expected values. Hint: A reasonable implementation might separate geocoordinates from the surface models that interpret them as points in space. There are actually quite a number of the latter as it turns out. Real topographic data could serve as a model also.


Last edited July 12, 2005 Return to WelcomeVisitors 