public/javascripts/vendor/javascripts/geolib.js
function(sexagesimal) {

			if (sexagesimal in geolib.decimal) {
				return geolib.decimal[sexagesimal];
			}

			var	regEx = new RegExp(sexagesimalPattern);
			var	data = regEx.exec(sexagesimal);

			if(data) {
				var min = parseFloat(data[2]/60);
				var sec = parseFloat(data[4]/3600) || 0;
			}

			var	dec = ((parseFloat(data[1]) + min + sec)).toFixed(8);
				// South and West are negative decimals
				dec = (data[7] == 'S' || data[7] == 'W') ? dec * -1 : dec;

			geolib.decimal[sexagesimal] = dec;

			return dec;

		}
function(sexagesimal) {

			if (sexagesimal in geolib.decimal) {
				return geolib.decimal[sexagesimal];
			}

			var	regEx = new RegExp(sexagesimalPattern);
			var	data = regEx.exec(sexagesimal);

			if(data) {
				var min = parseFloat(data[2]/60);
				var sec = parseFloat(data[4]/3600) || 0;
			}

			var	dec = ((parseFloat(data[1]) + min + sec)).toFixed(8);
				// South and West are negative decimals
				dec = (data[7] == 'S' || data[7] == 'W') ? dec * -1 : dec;

			geolib.decimal[sexagesimal] = dec;

			return dec;

		}
function ( sexagesimal ) { if ( sexagesimal in geolib . decimal ) { return geolib . decimal [ sexagesimal ] ; } var regEx = new RegExp ( sexagesimalPattern ) ; var data = regEx . exec ( sexagesimal ) ; if ( data ) { var min = parseFloat ( data [ 2 ] / 60 ) ; var sec = parseFloat ( data [ 4 ] / 3600 ) || 0 ; } var dec = ( ( parseFloat ( data [ 1 ] ) + min + sec ) ) . toFixed ( 8 ) ; // South and West are negative decimals dec = ( data [ 7 ] == 'S' || data [ 7 ] == 'W' ) ? dec * - 1 : dec ; geolib . decimal [ sexagesimal ] = dec ; return dec ; }
Converts a sexagesimal coordinate to decimal format

@param		float		Sexagesimal coordinate
@return		string		Decimal value (XX.XXXXXXXX)
Converts a sexagesimal coordinate to decimal format