Click or drag to resize
XDL

XDMBandPointsToGrid Class

XDMBandPointsToGrid 클래스는 위치와 고도/화소값으로 이우러진 점좌표 데이터를 그리드 형식의 데이터로 변환한다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NRSXDMBand
    Pixoneer.NXDL.NRSXDMBandPointsToGrid

Namespace:  Pixoneer.NXDL.NRS
Assembly:  NXDLrs (in NXDLrs.dll) Version: 1.2.817.72
Syntax
C#
public class XDMBandPointsToGrid : XDMBand

The XDMBandPointsToGrid type exposes the following members.

Constructors
  NameDescription
Public methodXDMBandPointsToGrid
XDMBandPointsToGrid 클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Methods
  NameDescription
Public methodGenerateOutput
입력된 점좌표 데이터들을 이용하여 출력 그리드 데이터로 변환한다.
Public methodGetInputParam
점좌표 데이터에서 그리드 형식의 데이터로 변환하는 입력 파라미터를 얻는다.
Public methodStatic memberSearchBoundInfo
입력 파일 경로의 데이터를 읽어 데이터의 공간 좌표값 중 최대값과 최소값을 계산한다. 현재는 확장자가 LAS파일인 경우만 지원한다.
Public methodSetInputParam
점좌표 데이터에서 그리드 형식의 데이터로 변환하기 위한 입력 파라미터를 설정한다.
Top
Examples
This is example #1:
using Pixoneer.NXDL;
using Pixoneer.NXDL.NRS;
using Pixoneer.NXDL.NIO;
// IO initialize to load image file
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
    return;
}

// Image load
String strFilePath = "D:\\Sample\\Tetons_200k.las";

// Check bounding area
double minx, maxx, miny, maxy;
minx = maxx = miny = maxy = 0;
XDMBandPointsToGrid.SearchBoundInfo(strFilePath, ref minx, ref maxx, ref miny, ref maxy, ref strError, null);

// Set input param
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;

// Create New process band and set input param
XDMBandPointsToGrid bandProcess = new XDMBandPointsToGrid();
if (!bandProcess.SetInputParam(ref InputParam))
{
    return;
}

// Generate output
XThread thd = null;
bandProcess.GenerateOutput(thd);

// create XRSSaveFile to save realtime band(XDMBandXXXX)
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandProcess;

fileSave.AddBand(ref bandCast);

// Save output file
String strFilePathSave = "D:\\Sample\\Out_Point2Grid.xdm";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd))
{
    return;
}
See Also