public static Bson geoWithinCenter ( final String fieldName , final double x , final double y , final double radius ) { BsonDocument center = new BsonDocument ( "$center" , new BsonArray ( Arrays . < BsonValue > asList ( new BsonArray ( asList ( new BsonDouble ( x ) , new BsonDouble ( y ) ) ) , new BsonDouble ( radius ) ) ) ) ; return new OperatorFilter < BsonDocument > ( "$geoWithin" , fieldName , center ) ; }
Creates a filter that matches all documents containing a field with grid coordinates data that exist entirely within the specified circle .