source:
trunk/workshop-routing-foss4g/web/proj4js/lib/projCode/utm.js
@
81
Revision 76, 1.5 KB checked in by djay, 13 years ago (diff) | |
---|---|
|
Rev | Line | |
---|---|---|
[76] | 1 | /******************************************************************************* |
2 | NAME TRANSVERSE MERCATOR | |
3 | ||
4 | PURPOSE: Transforms input longitude and latitude to Easting and | |
5 | Northing for the Transverse Mercator projection. The | |
6 | longitude and latitude must be in radians. The Easting | |
7 | and Northing values will be returned in meters. | |
8 | ||
9 | ALGORITHM REFERENCES | |
10 | ||
11 | 1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological | |
12 | Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United | |
13 | State Government Printing Office, Washington D.C., 1987. | |
14 | ||
15 | 2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", | |
16 | U.S. Geological Survey Professional Paper 1453 , United State Government | |
17 | Printing Office, Washington D.C., 1989. | |
18 | *******************************************************************************/ | |
19 | ||
20 | ||
21 | /** | |
22 | Initialize Transverse Mercator projection | |
23 | */ | |
24 | ||
25 | Proj4js.Proj.utm = { | |
26 | dependsOn : 'tmerc', | |
27 | ||
28 | init : function() { | |
29 | if (!this.zone) { | |
30 | Proj4js.reportError("utm:init: zone must be specified for UTM"); | |
31 | return; | |
32 | } | |
33 | this.lat0 = 0.0; | |
34 | this.long0 = ((6 * Math.abs(this.zone)) - 183) * Proj4js.common.D2R; | |
35 | this.x0 = 500000.0; | |
36 | this.y0 = this.utmSouth ? 10000000.0 : 0.0; | |
37 | this.k0 = 0.9996; | |
38 | ||
39 | Proj4js.Proj['tmerc'].init.apply(this); | |
40 | this.forward = Proj4js.Proj['tmerc'].forward; | |
41 | this.inverse = Proj4js.Proj['tmerc'].inverse; | |
42 | } | |
43 | }; |
Note: See TracBrowser
for help on using the repository browser.