Argument arg1 = (Argument)args.get(0);
	public Argument evaluate(ContextStack context, Argument arg1)		throws MapyrusException	{		Argument retval;		double degrees = 0, minutes = 0, seconds = 0;		int sign = 1;		String geo = arg1.toString().toLowerCase().trim();		try		{			/*			 * Parse any leading N, S, E, W letter.			 */			if (geo.startsWith("n") || geo.startsWith("e"))			{				geo = geo.substring(1);			}			else if (geo.startsWith("s") || geo.startsWith("w"))			{				geo = geo.substring(1);				sign = -1;			}			/*			 * Search for end of degree value.			 */			int dIndex = geo.indexOf('d');			if (dIndex < 0)				dIndex = geo.indexOf('');			if (dIndex < 0)				dIndex = geo.indexOf('\ufffd');			if (dIndex >= 0)			{				String geo2 = geo.substring(0, dIndex).trim();				degrees = Double.parseDouble(geo2);				/*				 * Search for end of minutes value, then parse it.				 */				int mIndex = geo.indexOf('m', dIndex);				if (mIndex < 0)					mIndex = geo.indexOf('\'', dIndex);				if (mIndex > 0)				{					String geo3 = geo.substring(dIndex + 1, mIndex);					if (geo3.startsWith("eg"))						geo3 = geo3.substring(2);					minutes = Double.parseDouble(geo3.trim());					/*				 	 * Search for end of seconds value.				 	 */					int sIndex = geo.indexOf('s', mIndex);					if (sIndex < 0)						sIndex = geo.indexOf('\"', mIndex);					if (sIndex > 0)					{						String geo4 = geo.substring(mIndex + 1, sIndex);						if (geo4.startsWith("in"))							geo4 = geo4.substring(2);						seconds = Double.parseDouble(geo4.trim());						/*						 * Parsed seconds value, with an 's'.						 * Remove parts of string we've parsed to avoid						 * interpreting it as meaning south.						 */						geo = geo.substring(sIndex + 1).trim();					}				}			}			/*			 * Parse any trailing N, S, E, W letter.			 */			if (geo.endsWith("n") || geo.endsWith("e"))			{				geo = geo.substring(0, geo.length() - 1);			}			else if (geo.endsWith("s") || geo.endsWith("w"))			{				geo = geo.substring(0, geo.length() - 1);				sign = -1;			}			if (dIndex < 0)			{				/*				 * Parse degrees as a plain number.				 */				degrees = Double.parseDouble(geo);			}			degrees *= sign;			if (degrees >= 0)				degrees = degrees + (minutes / 60) + (seconds / 3600);			else				degrees = degrees - (minutes / 60) - (seconds / 3600);		}		catch (NumberFormatException e)		{			throw new MapyrusException(MapyrusMessages.get(MapyrusMessages.INVALID_GEOGRAPHIC) +				": " + geo);		}		retval = new Argument(degrees);		return(retval);	}