/** * Returns a new MultiRangedRaster with selected indices. * * @param indices selected ranges * @return new MultiRangeRaster */ public MultiRangedRaster getRanges(int... indices) { MultiRangedRaster result = new MultiRangedRaster(); for (int index : indices) { result.addRaster(multiRange.get(index)); } return result; }
@Override public MultiRangedRaster copy() { MultiRangedRaster result = new MultiRangedRaster(); for (AbstractRaster r : multiRange) { result.addRaster(r.copy()); } return result; }
@Override public MultiRangedRaster getSubRaster( Envelope env, BandType[] bands, OriginLocation targetLocation) { if (getEnvelope().equals(env) && (bands == null || Arrays.equals(bands, getRasterDataInfo().bandInfo))) { return this; } checkBounds(env); MultiRangedRaster result = new MultiRangedRaster(); for (AbstractRaster raster : multiRange) { result.addRaster(raster.getSubRaster(env, bands, targetLocation)); } return result; }