Examples of SampleIndex


Examples of mil.nga.giat.geowave.raster.adapter.merge.nodata.NoDataMetadata.SampleIndex

      final Set<SampleIndex> noDataIndices,
      final NoDataMetadata noDataMetadata,
      final WritableRaster raster ) {
    final Iterator<SampleIndex> indices = noDataIndices.iterator();
    while (indices.hasNext()) {
      final SampleIndex index = indices.next();
      if (!noDataMetadata.isNoData(
          index,
          raster.getSampleDouble(
              index.getX(),
              index.getY(),
              index.getBand()))) {
        indices.remove();
      }
    }
    return new NoDataBySampleIndex(
        noDataIndices);
View Full Code Here

Examples of mil.nga.giat.geowave.raster.adapter.merge.nodata.NoDataMetadata.SampleIndex

        raster2.getNumBands());
    final Set<SampleIndex> indices = new HashSet<SampleIndex>();
    for (int b = 0; b < numBands; b++) {
      for (int x = 0; x < width; x++) {
        for (int y = 0; y < height; y++) {
          final SampleIndex index = new SampleIndex(
              x,
              y,
              b);
          if (noDataMetadata1.isNoData(
              index,
View Full Code Here

Examples of mil.nga.giat.geowave.raster.adapter.merge.nodata.NoDataMetadata.SampleIndex

      for (int y = 0; y < height; y++) {
        if (shape.accept(
            x,
            y)) {
          for (int b = 0; b < numBands; b++) {
            indices.add(new SampleIndex(
                x,
                y,
                b));
          }
          // this will ignore the no data values for this x,y
          // which should be fine because the shape will
          // always classify this x,y as "no data"
          continue;
        }
        else if (!skipNoData) {
          for (int b = 0; b < numBands; b++) {
            if (allNoDataValues[b] == null) {
              continue;
            }
            else {
              final double[] samples = data.getSampleValues(
                  x,
                  y,
                  b);
              for (int i = 0; i < allNoDataValues[b].length; i++) {
                // if a single sample is not a "no data" value
                // then it is valid
                boolean noData = true;
                for (final double sample : samples) {
                  if (sample != allNoDataValues[b][i]) {
                    noData = false;
                    break;
                  }
                }
                if (noData) {
                  indices.add(new SampleIndex(
                      x,
                      y,
                      b));
                  noDataValuesPerBand[b].add(allNoDataValues[b][i]);
                }
View Full Code Here

Examples of mil.nga.giat.geowave.raster.adapter.merge.nodata.NoDataMetadata.SampleIndex

        boolean recalculateMetadata = false;
        for (int b = 0; b < otherRaster.getNumBands(); b++) {
          for (int x = otherRaster.getMinX(); x < maxX; x++) {
            for (int y = otherRaster.getMinY(); y < maxY; y++) {
              if (otherTileMetadata.isNoData(
                  new SampleIndex(
                      x,
                      y,
                      b),
                  otherRaster.getSampleDouble(
                      x,
                      y,
                      b))) {
                final double sample = thisRaster.getSampleDouble(
                    x,
                    y,
                    b);
                if ((thisTileMetadata == null) || !thisTileMetadata.isNoData(
                    new SampleIndex(
                        x,
                        y,
                        b),
                    sample)) {
                  // we only need to recalculate metadata if
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.