예제 #1
0
        public void CreateCopy()
        {
            string              fname   = "E:\\DST_DBLV_FY3A_VIRR_1000M_DXX_P001_200911131352.MVG";
            IRasterDataDriver   drv     = GeoDataDriver.GetDriverByName("MVG") as IRasterDataDriver;
            string              dstName = "E:\\Copy.MVG";
            IRasterDataProvider srcprd  = drv.Open(fname, enumDataProviderAccess.ReadOnly) as IRasterDataProvider;
            IRasterDataProvider dstprd  = drv.CreateCopy(dstName, srcprd);

            Assert.True(File.Exists(dstName));
            dstprd.Dispose();
            srcprd.Dispose();
        }
예제 #2
0
        public void CreateCopy()
        {
            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.Dispose();
            srcprd.Dispose();
        }
예제 #3
0
        public void CreateCopyWithFillZero()
        {
            string              fname    = @"E:\\DST_DBLV_FY3A_VIRR_1000M_DXX_P001_200911131352.MVG";
            IRasterDataDriver   drv      = GeoDataDriver.GetDriverByName("MVG") as IRasterDataDriver;
            string              dstfname = "e:\\CreateCopy_Zero.mvg";
            IRasterDataProvider srcprd   = drv.Open(fname, enumDataProviderAccess.ReadOnly) as IRasterDataProvider;
            IRasterDataProvider dstprd   = drv.CreateCopy(dstfname, srcprd);

            for (int b = 1; b <= dstprd.BandCount; b++)
            {
                dstprd.GetRasterBand(b).Fill(0);
            }
            Assert.True(File.Exists(dstfname));
            dstprd.Dispose();
            srcprd.Dispose();
        }
예제 #4
0
        public void CreateCopyWithFillZero()
        {
            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_Zero.ldf";
            IRasterDataProvider srcprd   = drv.Open(fname, enumDataProviderAccess.ReadOnly) as IRasterDataProvider;
            IRasterDataProvider dstprd   = drv.CreateCopy(dstfname, srcprd);

            for (int b = 1; b <= dstprd.BandCount; b++)
            {
                dstprd.GetRasterBand(b).Fill(0);
            }
            Assert.True(File.Exists(dstfname));
            dstprd.Dispose();
            srcprd.Dispose();
        }