Package mil.nga.giat.geowave.index.sfc.data

Examples of mil.nga.giat.geowave.index.sfc.data.MultiDimensionalNumericData


          tableNamespace,
          index.getId().getString());
      final NumericIndexStrategy indexStrategy = index.getIndexStrategy();
      final TreeSet<Range> ranges;
      if (query != null) {
        final MultiDimensionalNumericData indexConstraints = query.getIndexConstraints(indexStrategy);
        if ((maxSplits != null) && (maxSplits > 0)) {
          ranges = AccumuloUtils.byteArrayRangesToAccumuloRanges(AccumuloUtils.constraintsToByteArrayRanges(
              indexConstraints,
              indexStrategy,
              maxSplits));
View Full Code Here


   *            the index
   * @return The insertions IDs for this object in the index
   */
  public List<ByteArrayId> getInsertionIds(
      final Index index ) {
    MultiDimensionalNumericData boxRangeData = getNumericData(index.getIndexModel().getDimensions());
    List<ByteArrayId> untrimmedResult = index.getIndexStrategy().getInsertionIds(
        boxRangeData);
    final int size = untrimmedResult.size();
    if (size > 2) {
      Iterator<ByteArrayId> it = untrimmedResult.iterator();
      while (it.hasNext()) {
        ByteArrayId insertionId = it.next();
        MultiDimensionalNumericData md = correctForNormalizationError(index.getIndexStrategy().getRangeForId(
            insertionId));
        // used to check the result of the index strategy
        if (LOGGER.isDebugEnabled() && checkCoverage(
            boxRangeData,
            md)) {
          LOGGER.error("Index strategy produced an unmatching tile during encoding and storing an entry");
        }
        if (!overlaps(
            md.getDataPerDimension(),
            index)) it.remove();
      }
    }
    return untrimmedResult;
  }
View Full Code Here

    dataPerDimension3[1] = new NumericValue(
        45);
    dataPerDimension3[2] = new NumericValue(
        cal.getTimeInMillis());

    MultiDimensionalNumericData indexedData = new BasicNumericDataset(
        dataPerDimension1);
    final NumericIndexStrategy strategy = new SpatialTemporalFactory().createIndexStrategy(DataType.VECTOR);

    final List<ByteArrayId> ids1 = strategy.getInsertionIds(indexedData);
    assertEquals(
View Full Code Here

        50.1902);
    dataPerDimension3[2] = new NumericRange(
        cal.getTimeInMillis(),
        calEnd.getTimeInMillis());

    MultiDimensionalNumericData indexedData = new BasicNumericDataset(
        dataPerDimension1);
    final NumericIndexStrategy strategy = TieredSFCIndexFactory.createEqualIntervalPrecisionTieredStrategy(
        SPATIAL_TEMPORAL_DIMENSIONS,
        new int[] {
          20,
View Full Code Here

              e);
          return null;
        }
      }

      final MultiDimensionalNumericData bounds = GeometryUtils.basicConstraintsFromEnvelope(
          projectedReferenceEnvelope).getIndexConstraints(
          index.getIndexStrategy());
      final GridEnvelope gridEnvelope = gridCoverage.getGridGeometry().getGridRange();
      final double[] tileRangePerDimension = new double[bounds.getDimensionCount()];
      final double[] maxValuesPerDimension = bounds.getMaxValuesPerDimension();
      final double[] minValuesPerDimension = bounds.getMinValuesPerDimension();
      double maxSpan = -Double.MAX_VALUE;
      for (int d = 0; d < tileRangePerDimension.length; d++) {
        tileRangePerDimension[d] = ((maxValuesPerDimension[d] - minValuesPerDimension[d]) * tileSize) / gridEnvelope.getSpan(d);

        maxSpan = Math.max(
View Full Code Here

      final NumericDimensionDefinition[] baseDefinitions,
      final SpaceFillingCurve sfc ) {
    final SFCIdAndBinInfo sfcIdAndBinInfo = getSFCIdAndBinInfo(
        rowId,
        baseDefinitions);
    final MultiDimensionalNumericData numericData = sfc.getRanges(sfcIdAndBinInfo.sfcId);
    // now we need to unapply the bins to the data, denormalizing the
    // ranges to the native bounds
    if (sfcIdAndBinInfo.rowIdOffset > 1) {
      final NumericData[] data = numericData.getDataPerDimension();
      for (final Entry<Integer, byte[]> entry : sfcIdAndBinInfo.binIds.entrySet()) {
        final int dimension = entry.getKey();
        final NumericRange range = baseDefinitions[dimension].getDenormalizedRange(new BinRange(
            entry.getValue(),
            data[dimension].getMin(),
View Full Code Here

    final Object rasterTile = data.getAdapterExtendedData().getValue(
        DATA_FIELD_ID);
    if ((rasterTile == null) || !(rasterTile instanceof RasterTile)) {
      return null;
    }
    final MultiDimensionalNumericData indexRange = index.getIndexStrategy().getRangeForId(
        data.getIndexInsertionId());
    final NumericDimensionDefinition[] orderedDimensions = index.getIndexStrategy().getOrderedDimensionDefinitions();

    final double[] minsPerDimension = indexRange.getMinValuesPerDimension();
    final double[] maxesPerDimension = indexRange.getMaxValuesPerDimension();
    Double minX = null;
    Double maxX = null;
    Double minY = null;
    Double maxY = null;
    for (int d = 0; d < orderedDimensions.length; d++) {
View Full Code Here

        public GridCoverage next() {
          final ByteArrayId insertionId = insertionIds.next();
          if (insertionId == null) {
            return null;
          }
          final MultiDimensionalNumericData rangePerDimension = pyramidLevel.getIndexStrategy().getRangeForId(
              insertionId);
          final NumericDimensionDefinition[] dimensions = pyramidLevel.getIndexStrategy().getOrderedDimensionDefinitions();
          int longitudeIndex = 0, latitudeIndex = 1;
          final double[] minDP = new double[2];
          final double[] maxDP = new double[2];
          for (int d = 0; d < dimensions.length; d++) {
            if (dimensions[d] instanceof LatitudeDefinition) {
              latitudeIndex = d;
              minDP[1] = originalBounds.getMinValuesPerDimension()[d];
              maxDP[1] = originalBounds.getMaxValuesPerDimension()[d];
            }
            else if (dimensions[d] instanceof LongitudeDefinition) {
              longitudeIndex = d;
              minDP[0] = originalBounds.getMinValuesPerDimension()[d];
              maxDP[0] = originalBounds.getMaxValuesPerDimension()[d];
            }
          }

          final Envelope originalEnvelope = new GeneralEnvelope(
              minDP,
              maxDP);
          final double[] minsPerDimension = rangePerDimension.getMinValuesPerDimension();
          final double[] maxesPerDimension = rangePerDimension.getMaxValuesPerDimension();
          final ReferencedEnvelope mapExtent = new ReferencedEnvelope(
              minsPerDimension[longitudeIndex],
              maxesPerDimension[longitudeIndex],
              minsPerDimension[latitudeIndex],
              maxesPerDimension[latitudeIndex],
View Full Code Here

TOP

Related Classes of mil.nga.giat.geowave.index.sfc.data.MultiDimensionalNumericData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.