use of org.locationtech.geowave.core.index.sfc.tiered.TieredSFCIndexStrategy.TierIndexMetaData in project geowave by locationtech.
the class XZHierarchicalIndexStrategy method getQueryRanges.
@Override
public QueryRanges getQueryRanges(final MultiDimensionalNumericData indexedRange, final int maxEstimatedRangeDecomposition, final IndexMetaData... hints) {
// TODO don't just pass max ranges along to the SFC, take tiering and
// binning into account to limit the number of ranges correctly
TierIndexMetaData tieredHints = null;
XZHierarchicalIndexMetaData xzHints = null;
if ((hints != null) && (hints.length > 0)) {
tieredHints = (TierIndexMetaData) hints[0];
xzHints = (XZHierarchicalIndexMetaData) hints[1];
}
final QueryRanges queryRanges = rasterStrategy.getQueryRanges(indexedRange, maxEstimatedRangeDecomposition, tieredHints);
final List<BinnedNumericDataset> binnedQueries = BinnedNumericDataset.applyBins(indexedRange, baseDefinitions);
final List<SinglePartitionQueryRanges> partitionedRanges = new ArrayList<>();
if ((xzHints == null) || (xzHints.pointCurveCount > 0)) {
partitionedRanges.addAll(BinnedSFCUtils.getQueryRanges(binnedQueries, pointCurve, // for
maxEstimatedRangeDecomposition, // SFCs
pointCurveMultiDimensionalId));
}
if ((xzHints == null) || (xzHints.xzCurveCount > 0)) {
partitionedRanges.addAll(BinnedSFCUtils.getQueryRanges(binnedQueries, xzCurve, // for
maxEstimatedRangeDecomposition, // SFCs
xzCurveMultiDimensionalId));
}
if (partitionedRanges.isEmpty()) {
return queryRanges;
}
final List<QueryRanges> queryRangesList = new ArrayList<>();
queryRangesList.add(queryRanges);
queryRangesList.add(new QueryRanges(partitionedRanges));
return new QueryRanges(queryRangesList);
}
Aggregations