Examples of SpaceFillingCurve


Examples of com.google.uzaygezen.core.SpaceFillingCurve

    final byte[][] qualifiers = {"NICE".getBytes(Charsets.ISO_8859_1),};
    MultiDimensionalSpec spec = new MultiDimensionalSpec(Ints.asList(30, 10, 25));
    // Add some data.
    Random rnd = new Random(TestUtils.SEED);
    int[][] data = generateData(spec, 1 << 16, rnd);
    SpaceFillingCurve sfc = new CompactHilbertCurve(spec);
    logger.log(Level.INFO, "Populating table with up to {0} rows.", data.length);
    populateTable(family, qualifiers, spec, data, sfc, table);
    int cacheSize = 1 << 8;
    logger.log(Level.INFO, "Building cache of size {0}.", cacheSize);
    // The cache is optional.
View Full Code Here

Examples of mil.nga.giat.geowave.index.sfc.SpaceFillingCurve

      new SFCDimensionDefinition(
          new LongitudeDefinition(),
          LONGITUDE_BITS)
    };

    SpaceFillingCurve hilbertSFC = SFCFactory.createSpaceFillingCurve(
        SPATIAL_DIMENSIONS,
        SFCType.HILBERT);
    Assert.assertEquals(
        expectedID,
        ByteBuffer.wrap(
            hilbertSFC.getId(testValues)).getLong());

  }
View Full Code Here

Examples of mil.nga.giat.geowave.index.sfc.SpaceFillingCurve

      new SFCDimensionDefinition(
          new LongitudeDefinition(),
          LONGITUDE_BITS)
    };

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

    Assert.assertEquals(
        expectedID,
        ByteBuffer.wrap(
            hilbertSFC.getId(testValues)).getLong());

  }
View Full Code Here

Examples of mil.nga.giat.geowave.index.sfc.SpaceFillingCurve

      new SFCDimensionDefinition(
          new LongitudeDefinition(),
          LONGITUDE_BITS)
    };

    SpaceFillingCurve hilbertSFC = SFCFactory.createSpaceFillingCurve(
        SPATIAL_DIMENSIONS,
        SFCType.HILBERT);
    Assert.assertEquals(
        expectedID,
        ByteBuffer.wrap(
            hilbertSFC.getId(testValues)).getLong());

  }
View Full Code Here

Examples of mil.nga.giat.geowave.index.sfc.SpaceFillingCurve

      new SFCDimensionDefinition(
          new LongitudeDefinition(),
          LONGITUDE_BITS)
    };

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

    Assert.assertTrue(SignedBytes.lexicographicalComparator().compare(
        hilbertSFC.getId(minValue),
        hilbertSFC.getId(maxValue)) < 0);

  }
View Full Code Here

Examples of mil.nga.giat.geowave.index.sfc.SpaceFillingCurve

      new SFCDimensionDefinition(
          new LongitudeDefinition(),
          LONGITUDE_BITS)
    };

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

    Assert.assertEquals(
        expectedID,
        ByteBuffer.wrap(
            hilbertSFC.getId(testValues)).getLong());

  }
View Full Code Here

Examples of mil.nga.giat.geowave.index.sfc.SpaceFillingCurve

      new SFCDimensionDefinition(
          new LatitudeDefinition(),
          LATITUDE_BITS)
    };

    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,
          rangeY
        });

    RangeDecomposition rangeDecomposition = hilbertSFC.decomposeQuery(
        spatialQuery,
        1);

    Assert.assertEquals(
        1,
View Full Code Here

Examples of mil.nga.giat.geowave.index.sfc.SpaceFillingCurve

      new SFCDimensionDefinition(
          new LatitudeDefinition(),
          LATITUDE_BITS)
    };

    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,
          rangeY
        });

    RangeDecomposition rangeDecomposition = hilbertSFC.decomposeQuery(
        spatialQuery,
        20);

    Assert.assertEquals(
        20,
View Full Code Here

Examples of mil.nga.giat.geowave.index.sfc.SpaceFillingCurve

    final List<ByteArrayRange> queryRanges = new ArrayList<ByteArrayRange>();
    final BinnedNumericDataset[] binnedQueries = BinnedNumericDataset.applyBins(
        indexedRange,
        baseDefinitions);
    for (int tier = orderedSfcs.length - 1; tier >= 0; tier--) {
      final SpaceFillingCurve sfc = orderedSfcs[tier];
      queryRanges.addAll(getQueryRanges(
          binnedQueries,
          sfc,
          maxRangeDecomposition,
          (byte) tier));
View Full Code Here

Examples of mil.nga.giat.geowave.index.sfc.SpaceFillingCurve

    // precision tier does not have a single SFC value for this data, it
    // will be multiple row IDs

    // what tier does this entry belong in?
    for (int tier = orderedSfcs.length - 1; tier >= 0; tier--) {
      final SpaceFillingCurve sfc = orderedSfcs[tier];
      // loop through space filling curves and stop when both the min and
      // max of the ranges fit the same row ID
      final List<ByteArrayId> rowIdsAtTier = getRowIdsAtTier(
          index,
          tier,
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.