src/org/ohmage/util/StringUtils.java
public static Double decodeLatitude(String latitude) {
		if(StringUtils.isEmptyOrWhitespaceOnly(latitude)) {
			return null;
		}
		
		try {
			Double latitudeDouble = Double.parseDouble(latitude);
			if((latitudeDouble < -LATITUDE_LIMIT) || (latitudeDouble > LATITUDE_LIMIT)) {
				return null;
			}
			else {
				return latitudeDouble;
			}
		}
		catch(NumberFormatException e) {
			return null;
		}
	}
/**
	 * Decodes a String into a Double and then verifies that it is a plausible
	 * latitude value. If the String is null, whitespace only, or not a
	 * plausible latitude value, null is returned; otherwise a Double 
	 * representing the latitude value is returned.
	 * 
	 * @param latitude The String to be decoded.
	 * 
	 * @return Null if the String is null, whitespace only, not a number, or
	 * 		   not a valid latitude value.
	 */
Decodes a String into a Double and then verifies that it is a plausible
latitude value. If the String is null, whitespace only, or not a
plausible latitude value, null is returned; otherwise a Double
representing the latitude value is returned.

@param latitude The String to be decoded.

@return Null if the String is null, whitespace only, not a number, or
not a valid latitude value.
Decodes a String into a Double and then verifies that it is a plausible latitude value . If the String is null whitespace only or not a plausible latitude value null is returned ; otherwise a Double representing the latitude value is returned . @param latitude The String to be decoded . @return Null if the String is null whitespace only not a number or not a valid latitude value .
public static Double decodeLatitude(String latitude) {
		if(StringUtils.isEmptyOrWhitespaceOnly(latitude)) {
			return null;
		}
		try {
			Double latitudeDouble = Double.parseDouble(latitude);
			if((latitudeDouble < -LATITUDE_LIMIT) || (latitudeDouble > LATITUDE_LIMIT)) {
				return null;
			}
			else {
				return latitudeDouble;
			}
		}
		catch(NumberFormatException e) {
			return null;
		}
	}
public static Double decodeLatitude ( String latitude ) { if ( StringUtils . isEmptyOrWhitespaceOnly ( latitude ) ) { return null ; } try { Double latitudeDouble = Double . parseDouble ( latitude ) ; if ( ( latitudeDouble < - LATITUDE_LIMIT ) || ( latitudeDouble > LATITUDE_LIMIT ) ) { return null ; } else { return latitudeDouble ; } } catch ( NumberFormatException e ) { return null ; } }
Decodes a String into a Double and then verifies that it is a plausible
 latitude value.
Decodes a String into a Double and then verifies that it is a plausible latitude value .