예제 #1
0
        public void BuildPyramidsTest()
        {
            using (ITempDir tmp = TempDir.Create())
            {
                // Small rasters don't need pyramids
                Raster rTempl          = new Raster(new FileInfo(DirHelpers.GetTestRasterPath("SquareValley950-980.tif")));
                Raster rTemplateOutput = RasterOperators.ExtendedCopy(rTempl, new FileInfo(Path.Combine(tmp.Name, "SMALL_PyramidTest.tif")));

                rTemplateOutput.BuildPyramids("average");
                Assert.IsFalse(File.Exists(Path.Combine(tmp.Name, "SMALL_PyramidTest.tif.ovr")));


                // Big Rasters do need pyramids
                Raster          rBigTempl          = new Raster(new FileInfo(DirHelpers.GetTestRootPath(@"BudgetSeg\SulphurCreek\2005Dec_DEM\2005Dec_DEM.img")));
                ExtentRectangle newExtReal         = rBigTempl.Extent.Buffer(1000);
                Raster          rBigTemplateOutput = RasterOperators.ExtendedCopy(rBigTempl, new FileInfo(Path.Combine(tmp.Name, "BIG_PyramidTest.tif")), newExtReal);

                rBigTemplateOutput.BuildPyramids("average");
                Assert.IsTrue(File.Exists(Path.Combine(tmp.Name, "BIG_PyramidTest.tif.ovr")));
            }
        }