Пример #1
0
        public static string RasterExportBand(string strInRasterFilePath
                                              , int fieldIndex
                                              , int bandIndex
                                              , string strOutRasterFilePath
                                              , string strOutputRasterDriver
                                              )
        {
            // Specify FieldBandFilter so that selected Field's AllBands will be converted to form single field output raster
            // depending upon Driver capabilities
            var fieldBandFilter = new FieldBandFilter((uint)fieldIndex, (uint)bandIndex);
            //Setting RasterCreationOptions and RasterFinalizationOptions as null. This will result in default settings read from user's preference file.
            var apiOptions = new RasterApiOptions(null, null, fieldBandFilter, null);

            RasterProcessing.Convert(strInRasterFilePath, strOutRasterFilePath, strOutputRasterDriver, apiOptions);

            return(strOutRasterFilePath);
        }