1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
/**
* APImethod: getMGRSZone
* Return the UTM zone and latitude band for a given longitude, latitude as
* explained in * http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system :
* Latitude bands
*
* Latitude bands are not a part of UTM, but rather a part of MGRS.
* They are however sometimes used.
*
* Latitude bands
*
* Each zone is segmented into 20 latitude bands. Each latitude band is 8
* degrees high, and is lettered starting from "C" at 80° S, increasing
* up the English alphabet until "X", omitting the letters "I" and "O"
* (because of their similarity to the numerals one and zero). The last
* latitude band, "X", is extended an extra 4 degrees, so it ends at 84°
* N latitude, thus covering the northernmost land on Earth. Latitude
* bands "A" and "B" do exist, as do bands "Y" and Z". They cover the
* western and eastern sides of the Antarctic and Arctic regions
* respectively. A convenient mnemonic to remember is that the letter "N"
* is the first letter in the northern hemisphere, so any letter coming
* before "N" in the alphabet is in the southern hemisphere, and any
* letter "N" or after is in the northern hemisphere.
* * Notation
*
* The combination of a zone and a latitude band defines a grid zone. The
* zone is always written first, followed by the latitude band. For
* example (see image, top right), a position in Toronto, Canada, would
* find itself in zone 17 and latitude band "T", thus the full grid zone
* reference is "17T". The grid zones serve to delineate irregular UTM
* zone boundaries. They also are an integral part of the military grid
* reference system.
*
* A note of caution: A method also is used that simply adds N or S
* following the zone number to indicate North or South hemisphere (the
* easting and northing coordinates along with the zone number supplying
* everything necessary to geolocate a position except which hemisphere).
* However, this method has caused some confusion since, for instance,
* "50S" can mean southern hemisphere but also grid zone "50S" in the
* northern hemisphere.
*
* Exceptions
*
* These grid zones are uniform over the globe, except in two areas. On
* the southwest coast of Norway, grid zone 32V is extended further west,
* and grid zone 31V is correspondingly shrunk to cover only open water.
* Also, in the region around Svalbard, the four grid zones 31X, 33X,
* 35X, and 37X are extended to cover what would otherwise have been
* covered by the seven grid zones 31X to 37X. The three grid zones 32X,
* 34X and 36X are not used.
*
* See also:
* http://en.wikipedia.org/wiki/Military_grid_reference_system
*
* Polar regions
*
* In the polar regions, a different convention is used. South of
* 80°S, UPS South (Universal Polar Stereographic) is used instead of a
* UTM projection. The west half-circle forms a grid zone with
* designation A; the east half-circle forms one with designation B; see
* figure 3. North of 84°N, UPS North is used, and the west half-circle
* is Y, the east one is Z; see figure 4. Since the letters A, B, Y, and
* Z are not used for any latitude bands of UTM, their presence in an
* MGRS coordinate, with the omission of a zone number, indicates that
* the coordinates are in the UPS system.
*
* The lettering scheme for 100,000 m squares is slightly different in
* the polar regions. The row letters go from A to Z, omitting I and O.
* The column letters use a more restricted alphabet, going from A to Z
* but omitting I, O, D, E, M, N, V, W; the columns are arranged so that
* the rightmost column in grid zone A and Y has column letter Z, and the
* next column in grid zone B or Z starts over with column letter A. The
* restricted column alphabet for UPS ensures that no UPS square will be
* adjacent to a UTM square with the same identification.
*
* In the polar regions, there is only one version of the lettering
* scheme.
*
* See also:
* http://en.wikipedia.org/wiki/Universal_Polar_Stereographic_coordinate_system
* http://fr.wikipedia.org/wiki/Fichier:Utm-zones.jpg
*
* Parameters:
* zone - {String} UTM zone
* ll - {<OpenLayers.LonLat>} longitude, latitude
*
*
* Returns:
* {String}
*/ |
Partager