|
XDMBandPointsToGrid Class
|
XDMBandPointsToGrid 클래스는 위치와 고도/화소값으로 이우러진 점좌표 데이터를 그리드 형식의 데이터로 변환한다.
LAS가 아닌 점 데이터인 경우, 텍스트 파일의 한 줄에 x, y, z(또는 화소값)으로 구성된 것으로 처리한다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NRSAssembly: NXDLrs (in NXDLrs.dll) Version: 2.0.3.38
Syntaxpublic class XDMBandPointsToGrid : XDMBand
The XDMBandPointsToGrid type exposes the following members.
Constructors
Methods
Example
아래의 예제는 LAS 데이터를 읽어 전체 영역을 계산한 뒤 출력크기 및 해상도 등을 설정한 후 XDM 파일로 저장하는 것이다.
using Pixoneer.NXDL;
using Pixoneer.NXDL.NRS;
using Pixoneer.NXDL.NIO;
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
return;
}
String strFilePath = "D:\\Sample\\Tetons_200k.las";
double minx, maxx, miny, maxy;
minx = maxx = miny = maxy = 0;
XDMBandPointsToGrid.SearchBoundInfo(strFilePath, ref minx, ref maxx, ref miny, ref maxy, ref strError, null);
XBandParamPointsToGrid InputParam = new XBandParamPointsToGrid();
InputParam.arrFileList.Add(strFilePath);
InputParam.BlankValue = 0;
InputParam.BSQOut = false;
InputParam.PixelSizeX = 1;
InputParam.PixelSizeY = 1;
InputParam.DimXSize = (int)((maxx - minx) / InputParam.PixelSizeX);
InputParam.DimYSize = (int)((maxy - miny) / InputParam.PixelSizeY);
InputParam.UpperLeftX = minx;
InputParam.UpperLeftY = maxy;
XDMBandPointsToGrid bandProcess = new XDMBandPointsToGrid();
if (!bandProcess.SetInputParam(ref InputParam))
{
return;
}
XThread thd = null;
bandProcess.GenerateOutput(thd);
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandProcess;
fileSave.AddBand(ref bandCast);
String strFilePathSave = "D:\\Sample\\Out_Point2Grid.xdm";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd))
{
return;
}
See Also