Click or drag to resize
XDL

XDMBandData2GIS Class

XDMBandData2GIS 클래스는 영상데이터의 화소값 구간을 정의하여 다른 형태의 산출물을 생성하고자 할 때 사용하는 클래스이다. 화소값 구간을 여러 개 정의할 수 있다는 것이 XDMBandDat2Binary와 다르며 또한 정의한 구간에 이름을 설정하여 참고할 수 있다. 예를 들어, 고도값을 가진 Band로부터 5개 구간의 고도를 등분하여 색상을 재 정의하여 도시하고 싶은 경우, 해당객체를 사용하게 되면 원하는 산출물을 생성이 가능하다.
Inheritance Hierarchy

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

The XDMBandData2GIS type exposes the following members.

Constructors
  NameDescription
Public methodXDMBandData2GIS
XDMBandData2GIS클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Methods
  NameDescription
Public methodGetInputParam
XDMBandData2GIS처리를 위한 파라미터를 얻는다.
Public methodSetInputParam
XDMBandData2GIS처리를 위한 입력 파라미터 설정.
Top
Remarks

Examples
DEM 데이터를 로딩하여 3개의 구간으로 나누어 영상을 새로이 정의하여 저장하는 예제이다. 구간을 나누는 정보는 아래와 같다. 첫번째 : 화소값이 0 이상이고 100 미만인 경우 0값을 할당하고 XDL 엔진 뷰에서 red로 표시되고, "aaa"라는 이름으로 명명한다. 두번째 : 화소값이 100 이상이고 500 미만인 경우 1값을 할당하고 XDL 엔진 뷰에서 blue로 표시되며, "bbb"라는 이름으로 명명한다. 세번째 : 화소값이 500 이상이고 50000 미만인 경우 2값을 할당하고 XDL 엔진 뷰에서 green으로 표시되며 "ccc"라는 이름으로 명명한다.
// IO initialize to load image file
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
    return;
}

// Image load
String strFilePathLoad = "D:\\Sample\\RS_Sample\\Data2GIS\\korea_dem_damyang_utm.xdm";
XRSLoadFile xrsFileInput = RasterIO.LoadFile(strFilePathLoad, out strError, false, eIOCreateXLDMode.All_NoMsg);

// Set input param 
XBandParamData2GIS InputParam = new XBandParamData2GIS();

// Common
InputParam.SrcBand = xrsFileInput.GetBandAt(0);
InputParam.ArrInvtervalInfo.Add(new XBandParamData2GIS_IntervalInfo(0, 0, 100, Color.Red, "aaa"));
InputParam.ArrInvtervalInfo.Add(new XBandParamData2GIS_IntervalInfo(1, 100, 500, Color.Blue, "bbb"));
InputParam.ArrInvtervalInfo.Add(new XBandParamData2GIS_IntervalInfo(2, 500, 50000, Color.Green, "ccc"));

// Create New process band and set input param
XDMBandData2GIS bandProcess  = new XDMBandData2GIS();
bandProcess.BandName = xrsFileInput.FileName;
bandProcess.SetInputParam(ref InputParam);

// Display to MapView in realtime

// create XRSSaveFile to save realtime band(XDMBandXXXX)
// load another file to protect thread lock(it is stable and faster).
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandProcess;
fileSave.AddBand(ref bandCast);

// Save output file
XThread thd = null;
String strFilePathSave = "D:\\Sample\\Out_Data2GIS.xdm";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd))
    System.Diagnostics.Debug.Write("Data2GIS - Fail");
else
    System.Diagnostics.Debug.Write("Data2GIS - Success");
See Also