Search in sources :

Example 1 with SimpleTimeIndexStrategy

use of org.locationtech.geowave.core.geotime.index.dimension.SimpleTimeIndexStrategy in project geowave by locationtech.

the class TemporalDimensionalityTypeProvider method createIndexFromOptions.

public static Index createIndexFromOptions(final TemporalOptions options) {
    if (!options.noTimeRanges) {
        final NumericDimensionDefinition[] dimensions = TEMPORAL_DIMENSIONS;
        final NumericDimensionField<?>[] fields = TEMPORAL_FIELDS;
        dimensions[dimensions.length - 1] = new TimeDefinition(options.periodicity);
        fields[dimensions.length - 1] = new TimeField(options.periodicity);
        final BasicIndexModel indexModel = new BasicIndexModel(fields);
        final String combinedArrayID = DEFAULT_TEMPORAL_ID_STR + "_" + options.periodicity;
        return new CustomNameIndex(XZHierarchicalIndexFactory.createFullIncrementalTieredStrategy(dimensions, new int[] { 63 }, SFCType.HILBERT, options.maxDuplicates), indexModel, combinedArrayID);
    }
    final BasicIndexModel indexModel = new BasicIndexModel(new NumericDimensionField[] { new BasicNumericDimensionField<>(TimeField.DEFAULT_FIELD_ID, Long.class) });
    return new CustomNameIndex(new SimpleTimeIndexStrategy(), indexModel, DEFAULT_TEMPORAL_ID_STR);
}
Also used : BasicNumericDimensionField(org.locationtech.geowave.core.store.dimension.BasicNumericDimensionField) NumericDimensionField(org.locationtech.geowave.core.store.dimension.NumericDimensionField) TimeField(org.locationtech.geowave.core.geotime.store.dimension.TimeField) NumericDimensionDefinition(org.locationtech.geowave.core.index.dimension.NumericDimensionDefinition) BasicIndexModel(org.locationtech.geowave.core.store.index.BasicIndexModel) TimeDefinition(org.locationtech.geowave.core.geotime.index.dimension.TimeDefinition) SimpleTimeDefinition(org.locationtech.geowave.core.geotime.index.dimension.SimpleTimeDefinition) CustomNameIndex(org.locationtech.geowave.core.store.index.CustomNameIndex) SimpleTimeIndexStrategy(org.locationtech.geowave.core.geotime.index.dimension.SimpleTimeIndexStrategy)

Aggregations

SimpleTimeDefinition (org.locationtech.geowave.core.geotime.index.dimension.SimpleTimeDefinition)1 SimpleTimeIndexStrategy (org.locationtech.geowave.core.geotime.index.dimension.SimpleTimeIndexStrategy)1 TimeDefinition (org.locationtech.geowave.core.geotime.index.dimension.TimeDefinition)1 TimeField (org.locationtech.geowave.core.geotime.store.dimension.TimeField)1 NumericDimensionDefinition (org.locationtech.geowave.core.index.dimension.NumericDimensionDefinition)1 BasicNumericDimensionField (org.locationtech.geowave.core.store.dimension.BasicNumericDimensionField)1 NumericDimensionField (org.locationtech.geowave.core.store.dimension.NumericDimensionField)1 BasicIndexModel (org.locationtech.geowave.core.store.index.BasicIndexModel)1 CustomNameIndex (org.locationtech.geowave.core.store.index.CustomNameIndex)1