KJB

Definitions for lat/long to/from UTM. More...
Go to the source code of this file.
Classes  
struct  kjb::TopoFusion::Ellipsoid 
a TopoFusion data structure used to represent an ellipsoid earth More...  
Namespaces  
kjb  
Classes and functions for dealing with trajectory files.  
kjb::TopoFusion  
this namespace hold structures and code written by Scott Morris.  
Functions  
void  kjb::TopoFusion::LLtoUTM (int ReferenceEllipsoid, const double Lat, const double Long, pt &utm) 
convert Latitude and Longitude to Universal Transverse Mercator coordinates More...  
void  kjb::TopoFusion::UTMtoGPXLL (int ReferenceEllipsoid, const pt &utm, double &Lat, double &Long) 
converts Universal Transverse Mercator coordinates coords to Latitude and Longitude. More...  
void  kjb::TopoFusion::utm_to_lat_long (int ReferenceEllipsoid, const pt &utm, double &Lat, double &Long) 
convert Universal Transverse Mercator coordinates to Latitude and Longitude More...  
void  kjb::TopoFusion::utm_to_lat_long (int ReferenceEllipsoid, const std::vector< pt > &utm_in, std::vector< double > *latitude_out, std::vector< double > *longitude_out) 
this is a fast, vectorized (bulk) version of the singlept function. More...  
double  kjb::TopoFusion::getNewEasting (const pt &utm, int new_zone) 
return an easting coordinate (from zone) relative to new_zone More...  
char  kjb::TopoFusion::zone_of (int ReferenceEllipsoid, const pt &p) 
return the proper zone number for the given point More...  
int  kjb::TopoFusion::validate_ellipsoid_table () 
verify that ellipsoid ids correspond to positions in ellipsoid list More...  
Definitions for lat/long to/from UTM.
Definitions for converting between latitudeandlongitude coordinates and UTM (Universal Transverse Mercator) coordinates. See copyright info in LatLonUTMconversion.cpp
As you probably know, latitude and longitude are (together) a system of specifying locations on the earth when regarded as a sphere. The sphere has one point called the north pole. The point on the sphere farthest from the north pole is called the south pole. Points on the sphere equidistant between north and south pole are the equator. Latitude describes northsouth position: it is expressed as an angle from 90 degrees to +90 degrees, and for any point except the poles or on the equator it is the angle formed by three points: the point of interest, the center of the sphere, and the nearest point on the equator. Points closer to the north pole than the south pole have a positive angle and can be said to have "north latitude"; "south latitude" latitude and a negative latitude angle correspond to the complementary case. Naturally the north pole has latitude +90 degrees, the south pole has latitude 90 degrees, and the equator has 0 degrees. Contours of constant latitude are circles, except at the poles. When facing the north pole and moving right along such a circle, that direction is known called east, whereas to the left is west. Longitude quantizes location in the east or west direction. It is expressed as an angle from 180 to +180 degrees. There is a semicircle on the sphere that runs from north pole to south pole through Greenwich, England (when the earth is modeled as a sphere) which is called the prime meridian. Any point P not on the Prime Meridian and not one of the poles has a longitude defined by the angle of the nearest equatorial point to P, the center of the sphere, and the intersection of the prime meridian and the equator. Any point in the open hemisphere whose boundary is defined by the prime meridian has a longitude that can be called east longitude or west longitude. A point that is infinitesimally west of the prime meridian, and all other points on that open hemisphere, have west longitude. The points of the other open hemisphere have east longitude. East and west longitude are indicated by the sign (positive or negative) of the angle; east longitudes are positive, west longitudes are negative. Since in fact the earth is not a sphere, in practice it is more useful to redefine these terms for an ellipsoid, but I don't know how. Captain Obvious thanks the reader for her or his attention.
as an alternative to latitude and longitude, which are angles, it is common to use a geolocation coordinate system called UTM. I don't have the energy now to describe it all, but it is based on the Mercator projection, and consists of three coordinates, called easting, northing, and zone. Similar to Latitude and Longitude, this coordinate system depends on the notions of the equator and east and west. There are a fixed number of zones, specified by small positive integers, used to describe compact, nonoverlapping regions of similar longitude. The easting coordinate is a measurement in meters of the distance between the point of interest and the westmost edge of the zone; I am not sure if that is a measurement along a circle of constant latitude, or along a "great circle" (a circle on the sphere through the sphere's center), or Euclidean distance; nor am I sure whether it is a distance between the point of interest and the nearest point on the zone's western boundary, or on the point of the zone's western boundary with the same latitude. In the continental USA, all of these variations will amount to nearly the same answer, and our imagery has resolution only down to the nearest meter, so it probably does not matter. Northing is a measurement in meters between the point of interest and the nearest point on the equator. Points north of the equator have positive northing, otherwise not. I could say more but I'm tired of all this prose.