if (bestCandidate != null) {
double dif = 0.1;
// create query
BooleanQuery rootQuery = new BooleanQuery();
// create spatial
SpatialClause spatialClause = createSpatialClause(meaning, true);
// parse and set boounding box
spatialClause.getBoundingEnvelope().setMinX(bestCandidate.getLocation()[0] - dif);
spatialClause.getBoundingEnvelope().setMinY(bestCandidate.getLocation()[1] - dif);
spatialClause.getBoundingEnvelope().setMaxX(bestCandidate.getLocation()[0] + dif);
spatialClause.getBoundingEnvelope().setMaxY(bestCandidate.getLocation()[1] + dif);
// combine all together usingspatial clause adapter
SpatialClauseAdapter spatialClauseAdapter = new SpatialClauseAdapter(getLuceneQueryAdapter());
spatialClauseAdapter.adaptSpatialClause(rootQuery, new LogicalClause.LogicalAnd(), spatialClause);
// assign output
q = rootQuery;