src/util/proj4-src.js
function getLetter100kID(column, row, parm) {
        // colOrigin and rowOrigin are the letters at the origin of the set
        var index = parm - 1;
        var colOrigin = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(index);
        var rowOrigin = SET_ORIGIN_ROW_LETTERS.charCodeAt(index);

        // colInt and rowInt are the letters to build to return
        var colInt = colOrigin + column - 1;
        var rowInt = rowOrigin + row;
        var rollover = false;

        if (colInt > Z) {
            colInt = colInt - Z + A - 1;
            rollover = true;
        }

        if (colInt === I || (colOrigin < I && colInt > I) || ((colInt > I || colOrigin < I) && rollover)) {
            colInt++;
        }

        if (colInt === O || (colOrigin < O && colInt > O) || ((colInt > O || colOrigin < O) && rollover)) {
            colInt++;

            if (colInt === I) {
                colInt++;
            }
        }

        if (colInt > Z) {
            colInt = colInt - Z + A - 1;
        }

        if (rowInt > V) {
            rowInt = rowInt - V + A - 1;
            rollover = true;
        }
        else {
            rollover = false;
        }

        if (((rowInt === I) || ((rowOrigin < I) && (rowInt > I))) || (((rowInt > I) || (rowOrigin < I)) && rollover)) {
            rowInt++;
        }

        if (((rowInt === O) || ((rowOrigin < O) && (rowInt > O))) || (((rowInt > O) || (rowOrigin < O)) && rollover)) {
            rowInt++;

            if (rowInt === I) {
                rowInt++;
            }
        }

        if (rowInt > V) {
            rowInt = rowInt - V + A - 1;
        }

        var twoLetter = String.fromCharCode(colInt) + String.fromCharCode(rowInt);
        return twoLetter;
    }
function getLetter100kID(column, row, parm) {
        // colOrigin and rowOrigin are the letters at the origin of the set
        var index = parm - 1;
        var colOrigin = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(index);
        var rowOrigin = SET_ORIGIN_ROW_LETTERS.charCodeAt(index);

        // colInt and rowInt are the letters to build to return
        var colInt = colOrigin + column - 1;
        var rowInt = rowOrigin + row;
        var rollover = false;

        if (colInt > Z) {
            colInt = colInt - Z + A - 1;
            rollover = true;
        }

        if (colInt === I || (colOrigin < I && colInt > I) || ((colInt > I || colOrigin < I) && rollover)) {
            colInt++;
        }

        if (colInt === O || (colOrigin < O && colInt > O) || ((colInt > O || colOrigin < O) && rollover)) {
            colInt++;

            if (colInt === I) {
                colInt++;
            }
        }

        if (colInt > Z) {
            colInt = colInt - Z + A - 1;
        }

        if (rowInt > V) {
            rowInt = rowInt - V + A - 1;
            rollover = true;
        }
        else {
            rollover = false;
        }

        if (((rowInt === I) || ((rowOrigin < I) && (rowInt > I))) || (((rowInt > I) || (rowOrigin < I)) && rollover)) {
            rowInt++;
        }

        if (((rowInt === O) || ((rowOrigin < O) && (rowInt > O))) || (((rowInt > O) || (rowOrigin < O)) && rollover)) {
            rowInt++;

            if (rowInt === I) {
                rowInt++;
            }
        }

        if (rowInt > V) {
            rowInt = rowInt - V + A - 1;
        }

        var twoLetter = String.fromCharCode(colInt) + String.fromCharCode(rowInt);
        return twoLetter;
    }
function getLetter100kID ( column , row , parm ) { // colOrigin and rowOrigin are the letters at the origin of the set var index = parm - 1 ; var colOrigin = SET_ORIGIN_COLUMN_LETTERS . charCodeAt ( index ) ; var rowOrigin = SET_ORIGIN_ROW_LETTERS . charCodeAt ( index ) ; // colInt and rowInt are the letters to build to return var colInt = colOrigin + column - 1 ; var rowInt = rowOrigin + row ; var rollover = false ; if ( colInt > Z ) { colInt = colInt - Z + A - 1 ; rollover = true ; } if ( colInt === I || ( colOrigin < I && colInt > I ) || ( ( colInt > I || colOrigin < I ) && rollover ) ) { colInt ++ ; } if ( colInt === O || ( colOrigin < O && colInt > O ) || ( ( colInt > O || colOrigin < O ) && rollover ) ) { colInt ++ ; if ( colInt === I ) { colInt ++ ; } } if ( colInt > Z ) { colInt = colInt - Z + A - 1 ; } if ( rowInt > V ) { rowInt = rowInt - V + A - 1 ; rollover = true ; } else { rollover = false ; } if ( ( ( rowInt === I ) || ( ( rowOrigin < I ) && ( rowInt > I ) ) ) || ( ( ( rowInt > I ) || ( rowOrigin < I ) ) && rollover ) ) { rowInt ++ ; } if ( ( ( rowInt === O ) || ( ( rowOrigin < O ) && ( rowInt > O ) ) ) || ( ( ( rowInt > O ) || ( rowOrigin < O ) ) && rollover ) ) { rowInt ++ ; if ( rowInt === I ) { rowInt ++ ; } } if ( rowInt > V ) { rowInt = rowInt - V + A - 1 ; } var twoLetter = String . fromCharCode ( colInt ) + String . fromCharCode ( rowInt ) ; return twoLetter ; }
Get the two-letter MGRS 100k designator given information
translated from the UTM northing, easting and zone number.

@private
@param {number} column the column index as it relates to the MGRS
100k set spreadsheet, created from the UTM easting.
Values are 1-8.
@param {number} row the row index as it relates to the MGRS 100k set
spreadsheet, created from the UTM northing value. Values
are from 0-19.
@param {number} parm the set block, as it relates to the MGRS 100k set
spreadsheet, created from the UTM zone. Values are from
1-60.
@return two letter MGRS 100k code.
Get the two - letter MGRS 100k designator given information translated from the UTM northing easting and zone number .