Пример #1
0
 /**
  * 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;
 }
Пример #2
0
 @Override
 public MultiRangedRaster copy() {
   MultiRangedRaster result = new MultiRangedRaster();
   for (AbstractRaster r : multiRange) {
     result.addRaster(r.copy());
   }
   return result;
 }
Пример #3
0
 @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;
 }