((RecursivePrefixTreeStrategy) strategy).setPrefixGridScanLevel(scanLevel);
Rectangle queryShape = randomRectangle();
Rectangle queryGridShape = gridSnapp(queryShape);
//Generate truth via brute force
final SpatialOperation operation = SpatialOperation.Intersects;
Set<String> expectedIds = new TreeSet<String>();
Set<String> optionalIds = new TreeSet<String>();
for (String id : indexedShapes.keySet()) {
Shape indexShape = indexedShapes.get(id);
Rectangle indexGridShape = indexedGriddedShapes.get(id);
if (operation.evaluate(indexShape, queryShape))
expectedIds.add(id);
else if (operation.evaluate(indexGridShape, queryGridShape))
optionalIds.add(id);
}
//Search and verify results
Query query = strategy.makeQuery(new SpatialArgs(operation, queryShape));