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

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


   *         ranges for a latitude dimension and a longitude dimension
   */
  public static Constraints basicConstraintsFromEnvelope(
      final Envelope env ) {
    // Create a NumericRange object using the x axis
    final NumericRange rangeLongitude = new NumericRange(
        env.getMinX(),
        env.getMaxX());

    // Create a NumericRange object using the y axis
    final NumericRange rangeLatitude = new NumericRange(
        env.getMinY(),
        env.getMaxY());

    final Map<Class<? extends NumericDimensionDefinition>, NumericData> constraintsPerDimension = new HashMap<Class<? extends NumericDimensionDefinition>, NumericData>();
    // Create and return a new IndexRange array with an x and y axis
View Full Code Here


   * @return The longitude range in EPSG:4326
   */
  public static NumericData longitudeRangeFromGeometry(
      final Geometry geometry ) {
    if ((geometry == null) || geometry.isEmpty()) {
      return new NumericRange(
          0,
          0);
    }
    // Get the envelope of the geometry being held
    final Envelope env = geometry.getEnvelopeInternal();

    // Create a NumericRange object using the x axis
    return new NumericRange(
        env.getMinX(),
        env.getMaxX());
  }
View Full Code Here

   * @return The latitude range in EPSG:4326
   */
  public static NumericData latitudeRangeFromGeometry(
      final Geometry geometry ) {
    if ((geometry == null) || geometry.isEmpty()) {
      return new NumericRange(
          0,
          0);
    }
    // Get the envelope of the geometry being held
    final Envelope env = geometry.getEnvelopeInternal();

    // Create a NumericRange object using the y axis
    return new NumericRange(
        env.getMinY(),
        env.getMaxY());
  }
View Full Code Here

  private MultiDimensionalNumericData correctForNormalizationError(
      MultiDimensionalNumericData boxRangeData ) {
    final NumericData[] currentDataSet = boxRangeData.getDataPerDimension();
    final NumericData[] dataPerDimension = new NumericData[currentDataSet.length];
    for (int d = 0; d < currentDataSet.length; d++) {
      dataPerDimension[d] = new NumericRange(
          currentDataSet[d].getMin() - 1E-12d,
          currentDataSet[d].getMax() + 1E-12d);
    }
    return new BasicNumericDataset(
        dataPerDimension);
View Full Code Here

        "MM-dd-yyyy HH:mm:ss");
    cal.setTime(format.parse("03-03-1999 11:01:01"));
    calEnd.setTime(format.parse("03-03-1999 11:05:01"));

    final NumericData[] dataPerDimension1 = new NumericData[SPATIAL_TEMPORAL_DIMENSIONS.length];
    dataPerDimension1[0] = new NumericRange(
        45.170,
        45.173);
    dataPerDimension1[1] = new NumericRange(
        50.190,
        50.192);
    dataPerDimension1[2] = new NumericRange(
        cal.getTimeInMillis(),
        calEnd.getTimeInMillis());

    final int year = cal.get(Calendar.YEAR);

    cal.set(
        Calendar.DAY_OF_YEAR,
        1);
    final NumericData[] dataPerDimension2 = new NumericData[SPATIAL_TEMPORAL_DIMENSIONS.length];
    dataPerDimension2[0] = new NumericRange(
        45,
        50);
    dataPerDimension2[1] = new NumericRange(
        45,
        50);
    dataPerDimension2[2] = new NumericRange(
        cal.getTimeInMillis(),
        calEnd.getTimeInMillis());

    cal.set(
        Calendar.YEAR,
        year - 1);
    calEnd.set(
        Calendar.YEAR,
        year - 1);
    final NumericData[] dataPerDimension3 = new NumericData[SPATIAL_TEMPORAL_DIMENSIONS.length];
    dataPerDimension3[0] = new NumericRange(
        45.1701,
        45.1703);
    dataPerDimension3[1] = new NumericRange(
        50.1901,
        50.1902);
    dataPerDimension3[2] = new NumericRange(
        cal.getTimeInMillis(),
        calEnd.getTimeInMillis());

    MultiDimensionalNumericData indexedData = new BasicNumericDataset(
        dataPerDimension1);
View Full Code Here

    SpaceFillingCurve hilbertSFC = SFCFactory.createSpaceFillingCurve(
        SPATIAL_DIMENSIONS,
        SFCType.HILBERT);

    // Create a IndexRange object using the x axis
    final NumericRange rangeX = new NumericRange(
        55,
        57);

    // Create a IndexRange object using the y axis
    final NumericRange rangeY = new NumericRange(
        25,
        27);
    BasicNumericDataset spatialQuery = new BasicNumericDataset(
        new NumericData[] {
          rangeX,
View Full Code Here

    SpaceFillingCurve hilbertSFC = SFCFactory.createSpaceFillingCurve(
        SPATIAL_DIMENSIONS,
        SFCType.HILBERT);
    // Create a IndexRange object using the x axis
    final NumericRange rangeX = new NumericRange(
        10,
        57);

    // Create a IndexRange object using the y axis
    final NumericRange rangeY = new NumericRange(
        25,
        50);
    BasicNumericDataset spatialQuery = new BasicNumericDataset(
        new NumericData[] {
          rangeX,
View Full Code Here

  private BinRange[] getNormalizedRanges(
      final double minRange,
      final double maxRange ) {

    return new LongitudeDefinition().getNormalizedRanges(new NumericRange(
        minRange,
        maxRange));

  }
View Full Code Here

      final double minRange,
      final double maxRange ) {

    return new BasicDimensionDefinition(
        MINIMUM,
        MAXIMUM).getNormalizedRanges(new NumericRange(
        minRange,
        maxRange));

  }
View Full Code Here

            sfcDimensions),
        testOperations.convertToHilbert(
            testValues4,
            compactHilbertCurve,
            sfcDimensions));
    final NumericRange rangeLongitude1 = new NumericRange(
        0,
        1);

    final NumericRange rangeLatitude1 = new NumericRange(
        0,
        1);
    final NumericRange rangeLongitude2 = new NumericRange(
        -21.324967549,
        28.4285637846834432543);

    final NumericRange rangeLatitude2 = new NumericRange(
        -43.7894445665435346547657867847657654,
        32.3254325834896543657895436543543659);

    final NumericRange rangeLongitude3 = new NumericRange(
        -10,
        0);

    final NumericRange rangeLatitude3 = new NumericRange(
        -10,
        0);
    final NumericRange rangeLongitude4 = new NumericRange(
        -Double.MIN_VALUE,
        0);

    final NumericRange rangeLatitude4 = new NumericRange(
        0,
        Double.MIN_VALUE);
    final RangeDecomposition expectedResult1 = expectedResultOperations.decomposeRange(
        new NumericData[] {
          rangeLongitude1,
View Full Code Here

TOP

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

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.