|
XDMBandData2GIS Class
|
XDMBandData2GIS 클래스는 영상데이터의 화소값 구간을 정의하여 다른 형태의 산출물을 생성하고자 할 때 사용하는 클래스이다.
화소값 구간을 여러 개 정의할 수 있다는 것이 XDMBandDat2Binary와 다르며 또한 정의한 구간에 이름을 설정하여 참고할 수 있다.
예를 들어, 고도값을 가진 Band로부터 5개 구간의 고도를 등분하여 색상을 재 정의하여 도시하고 싶은 경우, 해당객체를 사용하게 되면 원하는 산출물을 생성이 가능하다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NRSAssembly: NXDLrs (in NXDLrs.dll) Version: 2.0.3.38
Syntaxpublic class XDMBandData2GIS : XDMBand
The XDMBandData2GIS type exposes the following members.
Constructors
Methods
Example
DEM 데이터를 로딩하여 3개의 구간으로 나누어 영상을 새로이 정의하여 저장하는 예제이다. 구간을 나누는 정보는 아래와 같다.
첫번째 : 화소값이 0 이상이고 100 미만인 경우 0값을 할당하고 XDL 엔진 뷰에서 red로 표시되고, "aaa"라는 이름으로 명명한다.
두번째 : 화소값이 100 이상이고 500 미만인 경우 1값을 할당하고 XDL 엔진 뷰에서 blue로 표시되며, "bbb"라는 이름으로 명명한다.
세번째 : 화소값이 500 이상이고 50000 미만인 경우 2값을 할당하고 XDL 엔진 뷰에서 green으로 표시되며 "ccc"라는 이름으로 명명한다.
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
return;
}
String strFilePathLoad = "D:\\Sample\\RS_Sample\\Data2GIS\\korea_dem_damyang_utm.xdm";
XRSLoadFile xrsFileInput = RasterIO.LoadFile(strFilePathLoad, out strError, false, eIOCreateXLDMode.All_NoMsg);
XBandParamData2GIS InputParam = new XBandParamData2GIS();
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"));
XDMBandData2GIS bandProcess = new XDMBandData2GIS();
bandProcess.BandName = xrsFileInput.FileName;
bandProcess.SetInputParam(ref InputParam);
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandProcess;
fileSave.AddBand(ref bandCast);
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