configuredNoDataValues = sampleDim.getNoDataValues();
} else if (properties != null && noDataProperty != null) { double[] wrappedNoDataValues = wrappedDims[0].getNoDataValues(); if (wrappedNoDataValues != null && wrappedNoDataValues.length > 0) { CoverageUtilities.setNoDataProperty(properties, wrappedNoDataValues[0]);
double[] candidateNoDataValues = candidateSD.getNoDataValues();
public RasterZonalStatisticsIterator( SimpleFeatureIterator zones, GridCoverage2D coverage, int band, SimpleFeatureType targetSchema, GridCoverage2D classification) { this.zones = zones; this.builder = new SimpleFeatureBuilder(targetSchema); this.dataCoverage = coverage; this.band = band; // prepare the classification image if necessary if (classification != null) { // find nodata values GridSampleDimension sampleDimension = classification.getSampleDimension(0); double[] nodataarr = sampleDimension.getNoDataValues(); double[] nodata = nodataarr != null ? nodataarr : new double[] {Double.NaN}; // this will adapt the classification image to the projection and image layout // of the data coverage classificationRaster = GridCoverage2DRIA.create(classification, dataCoverage, nodata); } }
if (sampleDimensions != null && sampleDimensions.length > 0) { GridSampleDimension sampleDimension = sampleDimensions[0]; noData = sampleDimension.getNoDataValues();
/** @param sd */ public void handleSampleDimensionNilValues(GridCoverage2D gc2d, GridSampleDimension sd) { handleSampleDimensionNilValues(gc2d, sd != null ? sd.getNoDataValues() : null); }
for (GridSampleDimension sd : gc2d.getSampleDimensions()) { final double[] sdNoData = sd.getNoDataValues(); if (sdNoData != null) { for (double nodata : sdNoData) {
double[] candidateNoDataValues = candidateSD.getNoDataValues();
public RasterZonalStatisticsIterator(SimpleFeatureIterator zones, GridCoverage2D coverage, int band, SimpleFeatureType targetSchema, GridCoverage2D classification) { this.zones = zones; this.builder = new SimpleFeatureBuilder(targetSchema); this.dataCoverage = coverage; this.band = band; // prepare the classification image if necessary if(classification != null) { // find nodata values GridSampleDimension sampleDimension = classification.getSampleDimension(0); double[] nodataarr = sampleDimension.getNoDataValues(); double nodata = nodataarr != null? nodataarr[0] : Double.NaN; // this will adapt the classification image to the projection and image layout // of the data coverage classificationRaster = GridCoverage2DRIA.create(classification, dataCoverage, nodata); } }
double[] nodataarr = sampleDimension.getNoDataValues();
GridSampleDimension[] bands = inputCoverage.getSampleDimensions(); double[] nodataValues = bands[0].getNoDataValues(); Object noData = nodataValues == null ? Integer.MAX_VALUE : nodataValues[0];
GridSampleDimension[] bands = inputCoverage.getSampleDimensions(); double[] nodataValues = bands[0].getNoDataValues(); Object noData = nodataValues == null ? Integer.MAX_VALUE : nodataValues[0];
GridSampleDimension[] bands = inputCoverage.getSampleDimensions(); double[] nodataValues = bands[0].getNoDataValues(); Object noData = nodataValues == null ? Integer.MAX_VALUE : nodataValues[0];
GridSampleDimension[] bands = inputCoverage.getSampleDimensions(); double[] nodataValues = bands[0].getNoDataValues(); Object noData = nodataValues == null ? Integer.MAX_VALUE : nodataValues[0];
public RasterCoverage(String sourceURL, GridCoverage2D coverage, GridSampleDimension dimension, boolean isSingleBand) { this.sourceURL = sourceURL; /* add band fragment ONLY if there is more than one band */ if (!isSingleBand) { this.sourceURL += "#" + Escape.forURL(dimension.toString()); } this.coverage = coverage; this.dimension = dimension; this.crs = coverage.getCoordinateReferenceSystem2D(); this.gridGeometry = coverage.getGridGeometry(); /* no data values */ noData = dimension.getNoDataValues(); /* TODO see if we have to add the band info */ this.layerName = MiscUtilities.getURLBaseName(sourceURL).toLowerCase(); xCellSize = coverage.getEnvelope2D().getWidth() / getXCells(); yCellSize = coverage.getEnvelope2D().getHeight() / getYCells(); this.boundingBox = new ReferencedEnvelope(coverage.getEnvelope2D().getMinX(), coverage .getEnvelope2D().getMaxX(), coverage.getEnvelope2D().getMinY(), coverage.getEnvelope2D() .getMaxY(), crs); }
public RasterCoverage(String name, GridCoverage2D raster) { this.coverage = raster; this.layerName = name; this.dimension = raster.getSampleDimension(0); // this.dimension = dimension; this.crs = coverage.getCoordinateReferenceSystem2D(); this.gridGeometry = coverage.getGridGeometry(); /* no data values */ noData = dimension.getNoDataValues(); xCellSize = coverage.getEnvelope2D().getWidth() / getXCells(); yCellSize = coverage.getEnvelope2D().getHeight() / getYCells(); this.boundingBox = new ReferencedEnvelope(coverage.getEnvelope2D().getMinX(), coverage .getEnvelope2D().getMaxX(), coverage.getEnvelope2D().getMinY(), coverage.getEnvelope2D() .getMaxY(), crs); // coverage.show(); }
GridSampleDimension[] bands = inputCoverage.getSampleDimensions(); double[] nodataValues = bands[0].getNoDataValues(); Object noData = nodataValues == null ? Integer.MAX_VALUE : nodataValues[0];
this.noDataValuesPerBand = new double[originalGridCoverage.getNumSampleDimensions()][]; for (int d = 0; d < this.noDataValuesPerBand.length; d++) { this.noDataValuesPerBand[d] = originalGridCoverage.getSampleDimension(d).getNoDataValues();
noData = dimension.getNoDataValues();
coverage = (GridCoverage2D) reader.read("tazdem", null); GridSampleDimension sampleDim = coverage.getSampleDimension(0); double[] noDataValues = sampleDim.getNoDataValues(); assertEquals(-999.0, noDataValues[0], DELTA); range = sampleDim.getRange();