private Item buildGeoLocation(String key, Inspector value) {
        HashMap<Integer, Inspector> children = childMap(value);
        Preconditions.checkArgument(children.size() == 4, "Expected 4 arguments, got %s.", children.size());
        String field = children.get(0).asString();
        var arg1 = children.get(1);
        var arg2 = children.get(2);
        var arg3 = children.get(3);
        var loc = new Location();
        if (arg3.type() != Type.STRING) {
           throw new IllegalArgumentException("Invalid geoLocation radius type "+arg3.type()+" for "+arg3);
        }
        double radius = DistanceParser.parse(arg3.asString());
        if (arg1.type() == Type.STRING && arg2.type() == Type.STRING) {
            var c1input = children.get(1).asString();
            var c2input = children.get(2).asString();
            var coord_1 = ParsedDegree.fromString(c1input, true, false);
            var coord_2 = ParsedDegree.fromString(c2input, false, true);
            if (coord_1.isLatitude && coord_2.isLongitude) {
                loc.setGeoCircle(coord_1.degrees, coord_2.degrees, radius);
            } else if (coord_2.isLatitude && coord_1.isLongitude) {
                loc.setGeoCircle(coord_2.degrees, coord_1.degrees, radius);
            } else {
                throw new IllegalArgumentException("Invalid geoLocation coordinates '"+c1input+"' and '"+c2input+"'");
            }
        } else if (arg1.type() == Type.DOUBLE && arg2.type() == Type.DOUBLE) {
            loc.setGeoCircle(arg1.asDouble(), arg2.asDouble(), radius);
        } else {
            throw new IllegalArgumentException("Invalid geoLocation coordinate types "+arg1.type()+" and "+arg2.type());
        }
        var item = new GeoLocationItem(loc, field);
        Inspector annotations = getAnnotations(value);
        if (annotations != null){
            annotations.traverse((ObjectTraverser) (annotation_name, annotation_value) -> {
                if (LABEL.equals(annotation_name)) {
                    item.setLabel(annotation_value.asString());
                }
            });
        }
        return item;
    }
Translates a list of grouping requests on JSON form to a list in the grouping language form
container-search/src/main/java/com/yahoo/search/query/SelectParser.java