if( spatial == null ) {
throw new UnsupportedSpatialOperation(args.getOperation());
}
if( valueSource != null ) {
valueSource = new CachingDoubleValueSource(valueSource);
}
else {
valueSource = makeDistanceValueSource(shape.getCenter());
}
Query spatialRankingQuery = new FunctionQuery(valueSource);