Search in sources :

Example 1 with PointVectorStrategy

use of org.apache.lucene.spatial.vector.PointVectorStrategy in project titan by thinkaurelius.

the class LuceneIndex method getSpatialStrategy.

private SpatialStrategy getSpatialStrategy(String key) {
    SpatialStrategy strategy = spatial.get(key);
    if (strategy == null) {
        synchronized (spatial) {
            if (!spatial.containsKey(key)) {
                //                    SpatialPrefixTree grid = new GeohashPrefixTree(ctx, GEO_MAX_LEVELS);
                //                    strategy = new RecursivePrefixTreeStrategy(grid, key);
                strategy = new PointVectorStrategy(ctx, key);
                spatial.put(key, strategy);
            } else
                return spatial.get(key);
        }
    }
    return strategy;
}
Also used : PointVectorStrategy(org.apache.lucene.spatial.vector.PointVectorStrategy) SpatialStrategy(org.apache.lucene.spatial.SpatialStrategy)

Aggregations

SpatialStrategy (org.apache.lucene.spatial.SpatialStrategy)1 PointVectorStrategy (org.apache.lucene.spatial.vector.PointVectorStrategy)1