XRasterIOCreateImagePyramid Method |
Namespace: Pixoneer.NXDL.NIO
public bool CreateImagePyramid( string strFileName, eIOCreateXLDMode createMode, XRSMetaData createOption, bool bOverwrite, out string strError, XThread thd )
using Pixoneer.NXDL; using Pixoneer.NXDL.NIO; using Pixoneer.NXDL.NRS; // 영상의 입출력을 담당할 객체 선언 XRasterIO RasterIO = new XRasterIO(); String strError = ""; if (RasterIO.Initialize(out strError) == false) { return; } string filePath = @"c:\Samples\test.tif"; string strError = ""; // 기존의 XLD를 삭제하고 영상 피라미드 데이터(입력 파일 확장자 대신 ".xld"를 붙인 파일)를 재생성한다. bool res = m_RasterIO.CreateImagePyramid(filePath, eIOCreateXLDMode.All_NoMsg, null, true, out strError, null);
using Pixoneer.NXDL; using Pixoneer.NXDL.NIO; using Pixoneer.NXDL.NRS; // 영상의 입출력을 담당할 객체 선언 XRasterIO RasterIO = new XRasterIO(); String strError = ""; if (RasterIO.Initialize(out strError) == false) { return; } string filePath = @"c:\Samples\test.tif"; string strError = ""; XRSMetaData options = new XRSMetaData(); // resampling method. 기본값은 nearest // valid value : nearest|average|rms|gauss|cubic|cubicspline|lanczos|average_magphase|mode options.SetValue("Resampling", "average", "OVERVIEW"); // 오버뷰 생성은 위한 2의 거듭제곱 계수 개수. // NumLevel을 설정하지 않으면, 가장 작은 오버뷰가 MinSize(기본값 256)보다 작을 때까지 2의 거듭제곱 계수로 적절한 오버뷰를 생성 options.SetValue("NumLevel", "5", "OVERVIEW"); // GEOTIFF의 압축 방식. 기본값 NONE options.SetValue("COMPRESS_OVERVIEW", "LZW", "config"); // 오버뷰의 블록 크기 설정. 설정하지 않으면 기본값 128 options.SetValue("GDAL_TIFF_OVR_BLOCKSIZE", "256", "config"); // 가작 작은 overview 레벨에서 가로 방향 또는 세로 방향 크기 중 최대값. 설정하지 않는 경우 기본값 256 options.SetValue("MinSize", "256", "OVERVIEW"); bool res = m_RasterIO.CreateImagePyramid(filePath, eIOCreateXLDMode.All_Ovr_NoMsg, options, true, out strError, null);