static public ParsedDegree fromString(String toParse, boolean assumeLatitude, boolean assumeLongitude) {
        if (assumeLatitude && assumeLongitude) {
            throw new IllegalArgumentException("value cannot be both latitude and longitude at once");
        }
        var parser = new OneDegreeParser(assumeLatitude, toParse);
        if (parser.foundLatitude) {
            return new ParsedDegree(parser.latitude, true, false);
        }
        if (parser.foundLongitude) {
            return new ParsedDegree(parser.longitude, false, true);
        }
        throw new IllegalArgumentException("could not parse: "+toParse);
    }
The parsed latitude or longitude
Degrees north or east if positive
Degrees south or west if negative
vespajlib/src/main/java/com/yahoo/geo/ParsedDegree.java