Package mosp :: Package geo :: Module utm
[hide private]
[frames] | no frames]

Module utm

source code

Working with UTM and Lat/Long coordinates

Based on http://home.hiwaay.net/~taylorc/toolbox/geography/geoutm.html


Author: P. Tute, C. Taylor

Contact: henne@dcsec.uni-hannover.de

Copyright: (c) 1997-2003 C. Taylor, 2010-2011, DCSec, Leibniz Universitaet Hannover, Germany

License: The Python code is based on Javascript code of Charles L. Taylor from http://home.hiwaay.net/~taylorc/toolbox/geography/geoutm.html The author allowed us to reuse his code. Original license: The documents, images, and other materials on the Chuck Taylor Web site are copyright (c) 1997-2003 by C. Taylor, unless otherwise noted. Visitors are permitted to download the materials located on the Chuck Taylor Web site to their own systems, on a temporary basis, for the purpose of viewing them or, in the case of software applications, using them in accordance with their intended purpose. Republishing or redistribution of any of the materials located on the Chuck Taylor Web site requires permission from C. Taylor. MoSP has been granted to use the code.

Functions [hide private]
 
long_to_zone(lon)
Calculates the current UTM-zone for a given longitude.
source code
 
rad_to_deg(rad)
Converts radians to degrees.
source code
 
deg_to_rad(deg)
Converts degrees to radians.
source code
 
UTMCentralMeridian(zone)
Calculates the central meridian for the given UTM-zone.
source code
 
ArcLengthOfMeridian(phi)
Computes the ellipsoidal distance from the equator to a point at a given latitude.
source code
 
MapLatLonToXY(phi, lambd, lambd0, xy)
Converts a latitude/longitude pair to x and y coordinates in the Transverse Mercator projection.
source code
 
latlong_to_utm(lon, lat, zone=None)
Converts a latitude/longitude pair to x and y coordinates in the Universal Transverse Mercator projection.
source code
 
FootpointLatitude(y)
Computes the footpoint latitude for use in converting transverse Mercator coordinates to ellipsoidal coordinates.
source code
 
MapXYToLatLon(x, y, lambda0)
Converts x and y coordinates in the Transverse Mercator projection to a latitude/longitude pair.
source code
 
utm_to_latlong(x, y, zone, southhemi=False)
Converts x and y coordinates in the Universal Transverse Mercator projection to a latitude/longitude pair.
source code
Variables [hide private]
  __maintainer__ = 'B. Henne'
  UTMScaleFactor = 0.9996
Ellipsoid model constant
  sm_a = 6378137.0
Ellipsoid model constant: Semi-major axis a
  sm_b = 6356752.314
Ellipsoid model constant: Semi-major axis b
  sm_EccSquared = 0.00669437999013
Ellipsoid model constant
  __package__ = 'mosp.geo'
Function Details [hide private]

ArcLengthOfMeridian(phi)

source code 

Computes the ellipsoidal distance from the equator to a point at a given latitude.

Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J., GPS: Theory and Practice, 3rd ed. New York: Springer-Verlag Wien, 1994.

MapLatLonToXY(phi, lambd, lambd0, xy)

source code 

Converts a latitude/longitude pair to x and y coordinates in the Transverse Mercator projection. Note that Transverse Mercator is not the same as UTM a scale factor is required to convert between them.

Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J., GPS: Theory and Practice, 3rd ed. New York: Springer-Verlag Wien, 1994.

FootpointLatitude(y)

source code 

Computes the footpoint latitude for use in converting transverse Mercator coordinates to ellipsoidal coordinates.

Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J., GPS: Theory and Practice, 3rd ed. New York: Springer-Verlag Wien, 1994.

MapXYToLatLon(x, y, lambda0)

source code 

Converts x and y coordinates in the Transverse Mercator projection to a latitude/longitude pair. Note that Transverse Mercator is not the same as UTM a scale factor is required to convert between them.

Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J., GPS: Theory and Practice, 3rd ed. New York: Springer-Verlag Wien, 1994.

Remarks: The local variables Nf, nuf2, tf, and tf2 serve the same purpose as N, nu2, t, and t2 in MapLatLonToXY, but they are computed with respect sto the footpoint latitude phif.

x1frac, x2frac, x2poly, x3poly, etc. are to enhance readability and to optimize computations.