Пример #1
0
 private Band[] GetDstRasterBand(AbstractWarpDataset dstRaster, FilePrjSettings prjSettings, int beginBandIndex)
 {
     Band[] bands   = new Band[prjSettings.OutBandNos.Length];
     int[]  bandNos = prjSettings.OutBandNos;
     for (int i = beginBandIndex; i < bandNos.Length + beginBandIndex; i++)
     {
         if (dstRaster.isMultiDs)
         {
             int newBand = -1;
             if (dstRaster.TryGetBandNoFromBandName(bandNos[i], out newBand))
             {
                 bands[i] = dstRaster.GetRasterBand(newBand);
             }
             else
             {
                 bands[i] = dstRaster.GetRasterBand(bandNos[i]);
             }
         }
         else
         {
             bands[i] = dstRaster.GetRasterBand(bandNos[i]);
         }
     }
     return(bands);
 }