Package mil.nga.giat.geowave.index

Examples of mil.nga.giat.geowave.index.ByteArrayId


    if (!checkName(coverageName)) {
      LOGGER.warn("Unable to find data adapter for '" + coverageName + "'");
      return null;
    }

    final RasterDataAdapter adapter = (RasterDataAdapter) geowaveAdapterStore.getAdapter(new ByteArrayId(
        coverageName));
    final GridEnvelope gridEnvelope = getOriginalGridRange();
    return new ImageLayout().setMinX(
        gridEnvelope.getLow(0)).setMinY(
        gridEnvelope.getLow(1)).setTileWidth(
View Full Code Here


  @Override
  public double[][] getResolutionLevels(
      final String coverageName )
      throws IOException {
    final DataStatistics<?> stats = geowaveStatisticsStore.getDataStatistics(
        new ByteArrayId(
            coverageName),
        OverviewStatistics.STATS_ID);
    if ((stats != null) && (stats instanceof OverviewStatistics)) {
      final Resolution[] resolutions = ((OverviewStatistics) stats).getResolutions();
      final double[][] retVal = new double[resolutions.length][];
View Full Code Here

      final String coverageName,
      final double resX,
      final double resY )
      throws IOException {
    final DataStatistics<?> stats = geowaveStatisticsStore.getDataStatistics(
        new ByteArrayId(
            coverageName),
        HistogramStatistics.STATS_ID);
    if ((stats != null) && (stats instanceof HistogramStatistics)) {
      return ((HistogramStatistics) stats).getHistogram(new Resolution(
          new double[] {
View Full Code Here

          NATIVE_FIELD_HANDLER_LIST);
    }

    @Override
    public ByteArrayId getAdapterId() {
      return new ByteArrayId(
          "test");
    }
View Full Code Here

    }

    @Override
    public ByteArrayId getDataId(
        final TestGeometry entry ) {
      return new ByteArrayId(
          entry.id);
    }
View Full Code Here

    CloseableIterator<GeoWaveData<SimpleFeature>> consumer = pluggin.toGeoWaveData(
        new File(
            this.getClass().getClassLoader().getResource(
                "12345.xml").getPath()),
        new ByteArrayId(
            "123".getBytes()),
        "");

    int totalCount = 0;
    while (consumer.hasNext()) {
View Full Code Here

          33)
    });

 

    final ByteArrayId rowId0 = mockDataStore.ingest(
        adapter,
        index,
        new TestGeometry(
            factory.createPoint(new Coordinate(
                25,
                32)),
            "test_pt"),
        visWriterAAA).get(
        0);
   
   
    final ByteArrayId rowId1 = mockDataStore.ingest(
        adapter,
        index,
        new TestGeometry(
            factory.createPoint(new Coordinate(
                26,
                32)),
            "test_pt_1"),
        visWriterAAA).get(
        0);

    mockDataStore.ingest(
        adapter,
        index,
        new TestGeometry(
            factory.createPoint(new Coordinate(
                27,
                32)),
            "test_pt_2"),
        visWriterBBB).get(
        0);

    final SpatialQuery query = new SpatialQuery(
        testGeoFilter);
    CloseableIterator it1 = mockDataStore.query(
        adapter,
        index,
        query,
        -1,
        "aaa",
        "bbb");
    int count = 0;
    while (it1.hasNext()) {
      it1.next();
      count++;
    }
    assertEquals(
        3,
        count);

    CountDataStatistics countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
        adapter.getAdapterId(),
        CountDataStatistics.STATS_ID,
        "aaa",
        "bbb");
    assertEquals(
        3,
        countStats.getCount());

    countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
        adapter.getAdapterId(),
        CountDataStatistics.STATS_ID,
        "aaa");
    assertEquals(
        2,
        countStats.getCount());

    countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
        adapter.getAdapterId(),
        CountDataStatistics.STATS_ID,
        "bbb");
    assertEquals(
        1,
        countStats.getCount());

    assertFalse(mockDataStore.deleteEntry(
        index,
        new ByteArrayId("test_pt_2".getBytes()),
        adapter.getAdapterId(),
        "aaa"));

    it1 = mockDataStore.query(adapter,
        index,
        query,
        -1,
        "aaa",
        "bbb");
    count = 0;
    while (it1.hasNext()) {
      it1.next();
      count++;
    }
    assertEquals(
        3,
        count);
   
    assertTrue(mockDataStore.deleteEntry(
        index,
        new ByteArrayId("test_pt".getBytes()),
        adapter.getAdapterId(),
        "aaa"));

    it1 = mockDataStore.query(adapter,
        index,
View Full Code Here

  private final Index[] supportedIndices;

  public GeoLifeIngestPlugin() {

    geolifePointType = GeoLifeUtils.createGeoLifePointDataType();
    pointKey = new ByteArrayId(
        StringUtils.stringToBinary(GeoLifeUtils.GEOLIFE_POINT_FEATURE));
    geolifePointBuilder = new SimpleFeatureBuilder(
        geolifePointType);

    geolifeTrackType = GeoLifeUtils.createGeoLifeTrackDataType();
    trackKey = new ByteArrayId(
        StringUtils.stringToBinary(GeoLifeUtils.GEOLIFE_TRACK_FEATURE));
    geolifeTrackBuilder = new SimpleFeatureBuilder(
        geolifeTrackType);

    supportedIndices = new Index[] {
View Full Code Here

          NATIVE_FIELD_HANDLER_LIST);
    }

    @Override
    public ByteArrayId getAdapterId() {
      return new ByteArrayId(
          "test");
    }
View Full Code Here

    }

    @Override
    public ByteArrayId getDataId(
        final TestGeometry entry ) {
      return new ByteArrayId(
          entry.id);
    }
View Full Code Here

TOP

Related Classes of mil.nga.giat.geowave.index.ByteArrayId

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.