Examples of NumericRange


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

    if ((max < 0) || (max > 1)) {
      throw new IllegalArgumentException(
          "Value (" + value + ") is not within bounds. The normalized value (" + max + ") must be within (0,1)");
    }
    // scale it to a value within the dimension definition range
    return new NumericRange(
        boundedDimensionDefinition.denormalize(min),
        boundedDimensionDefinition.denormalize(max));

  }
View Full Code Here

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

      final String classNameStr = StringUtils.stringFromBinary(className);
      try {
        final Class<? extends NumericDimensionDefinition> cls = (Class<? extends NumericDimensionDefinition>) Class.forName(classNameStr);
        constraintsPerTypeOfDimensionDefinition.put(
            cls,
            new NumericRange(
                min,
                max));
      }
      catch (final ClassNotFoundException e) {
        LOGGER.warn(
View Full Code Here

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

        fieldId);
  }

  @Override
  public NumericData getFullRange() {   
    return new NumericRange(0, System.currentTimeMillis()+1);
  }
View Full Code Here

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

      final BinRange binnedRange ) {
    final Calendar startofEpoch = getStartEpoch(binnedRange.getBinId());
    final long startOfEpochMillis = startofEpoch.getTimeInMillis();
    final long minMillis = startOfEpochMillis + (long) binnedRange.getNormalizedMin();
    final long maxMillis = startOfEpochMillis + (long) binnedRange.getNormalizedMax();
    return new NumericRange(
        minMillis,
        maxMillis);
  }
View Full Code Here

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

      final Geometry queryGeometry ) {
    final Constraints constraints = GeometryUtils.basicConstraintsFromGeometry(queryGeometry);
    for (final TemporalRange range : temporalConstraints.constraints) {
      constraints.constraintsPerTypeOfDimensionDefinition.put(
          TimeDefinition.class,
          new NumericRange(
              range.getStartTime().getTime(),
              range.getEndTime().getTime()));
    }

    return constraints;
View Full Code Here

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

      final Date endTime,
      final Geometry queryGeometry ) {
    final Constraints constraints = GeometryUtils.basicConstraintsFromGeometry(queryGeometry);
    constraints.constraintsPerTypeOfDimensionDefinition.put(
        TimeDefinition.class,
        new NumericRange(
            startTime.getTime(),
            endTime.getTime()));
    return constraints;
  }
View Full Code Here

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

      this.visibility = visibility;
    }

    @Override
    public NumericData toNumericData() {
      return new NumericRange(
          startTime,
          endTime);
    }
View Full Code Here

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

    final int numDimensions = buf.getInt();
    dimensionFields = new DimensionField<?>[numDimensions];
    final NumericData[] data = new NumericData[numDimensions];
    for (int d = 0; d < numDimensions; d++) {
      final byte[] field = new byte[buf.getInt()];
      data[d] = new NumericRange(
          buf.getDouble(),
          buf.getDouble());
      buf.get(field);
      dimensionFields[d] = PersistenceUtils.fromBinary(
          field,
View Full Code Here

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

    TemporalRange range = new TemporalRange(new Date(100), new Date(1000));
    assertFalse(range.isWithin(new Date(10)));
    assertFalse(range.isWithin(new Date(100000)));
    assertTrue(range.isWithin(new Date(800)));

    assertFalse(range.isWithin(new NumericRange(20, 99)));
    assertFalse(range.isWithin(new NumericRange(1001, 9900)));
    assertTrue(range.isWithin(new NumericRange(998, 9900)));
    assertTrue(range.isWithin(new NumericRange(20, 199)));
    assertTrue(range.isWithin(new NumericRange(150, 199)));
  }
View Full Code Here

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

    binStrategy.setToEpoch(startCal);
    binStrategy.setToEpoch(endCal);
    endCal.add(
        unit.toCalendarEnum(),
        binCount);
    return binStrategy.getNormalizedRanges(new NumericRange(
        startCal.getTimeInMillis(),
        (double) endCal.getTimeInMillis() - 1));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.