예제 #1
0
        public void CreateCopy_AddBand()
        {
            string              fname    = @"D:\\FY3A_Mersi_2010_06_24_10_00_1000M_L1B_PRJ_Whole.LDF";
            IRasterDataDriver   drv      = GeoDataDriver.GetDriverByName("LDF") as IRasterDataDriver;
            string              dstfname = "d:\\CreateCopy.ldf";
            IRasterDataProvider srcprd   = drv.Open(fname, enumDataProviderAccess.ReadOnly) as IRasterDataProvider;
            IRasterDataProvider dstprd   = drv.CreateCopy(dstfname, srcprd);

            Assert.True(File.Exists(dstfname));
            dstprd.AddBand(enumDataType.UInt16);
            Assert.AreEqual(srcprd.BandCount + 1, dstprd.BandCount);
            dstprd.Dispose();
            srcprd.Dispose();
        }