driver-core/src/main/com/mongodb/client/model/Filters.java
public static Bson geoWithinBox(final String fieldName, final double lowerLeftX, final double lowerLeftY, final double upperRightX,
                                    final double upperRightY) {
        BsonDocument box = new BsonDocument("$box",
                                                   new BsonArray(asList(new BsonArray(asList(new BsonDouble(lowerLeftX),
                                                           new BsonDouble(lowerLeftY))),
                                                           new BsonArray(asList(new BsonDouble(upperRightX),
                                                                   new BsonDouble(upperRightY))))));
        return new OperatorFilter<BsonDocument>("$geoWithin", fieldName, box);
    }
public static Bson geoWithinBox(final String fieldName, final double lowerLeftX, final double lowerLeftY, final double upperRightX,
                                    final double upperRightY) {
        BsonDocument box = new BsonDocument("$box",
                                                   new BsonArray(asList(new BsonArray(asList(new BsonDouble(lowerLeftX),
                                                           new BsonDouble(lowerLeftY))),
                                                           new BsonArray(asList(new BsonDouble(upperRightX),
                                                                   new BsonDouble(upperRightY))))));
        return new OperatorFilter<BsonDocument>("$geoWithin", fieldName, box);
    }
Creates a filter that matches all documents containing a field with grid coordinates data that exist entirely within the specified
box.

@param fieldName   the field name
@param lowerLeftX  the lower left x coordinate of the box
@param lowerLeftY  the lower left y coordinate of the box
@param upperRightX the upper left x coordinate of the box
@param upperRightY the upper left y coordinate of the box
@return the filter
@mongodb.driver.manual reference/operator/query/geoWithin/ $geoWithin
@mongodb.driver.manual reference/operator/query/box/#op._S_box $box
@mongodb.server.release 2.4
@since 3.1