private long
parsePosition(Tokenizer st, String type) throws IOException {
	boolean isLatitude = type.equals("latitude");
	int deg = 0, min = 0;
	double sec = 0;
	long value;
	String s;

	deg = st.getUInt16();
	if (deg > 180 || (deg > 90 && isLatitude))
		throw st.exception("Invalid LOC " + type + " degrees");

	s = st.getString();
	try {
		min = Integer.parseInt(s);
		if (min < 0 || min > 59)
			throw st.exception("Invalid LOC " + type + " minutes");
		s = st.getString();
		sec = parseFixedPoint(s);
		if (sec < 0 || sec >= 60)
			throw st.exception("Invalid LOC " + type + " seconds");
		s = st.getString();
	} catch (NumberFormatException e) {
	}

	if (s.length() != 1)
		throw st.exception("Invalid LOC " + type);

	value = (long) (1000 * (sec + 60L * (min + 60L * deg)));

	char c = Character.toUpperCase(s.charAt(0));
	if ((isLatitude && c == 'S') || (!isLatitude && c == 'W'))
		value = -value;
	else if ((isLatitude && c != 'N') || (!isLatitude && c != 'E'))
		throw st.exception("Invalid LOC " + type);

	value += (1L << 31);

	return value;
}
Creates an LOC Record from the given data
@param latitude The latitude of the center of the sphere
@param longitude The longitude of the center of the sphere
@param altitude The altitude of the center of the sphere, in m
@param size The diameter of a sphere enclosing the described entity, in m.
@param hPrecision The horizontal precision of the data, in m.
@param vPrecision The vertical precision of the data, in m.
src/main/java/core/org/xbill/DNS/LOCRecord.java