Click or drag to resize
XDL

XConfiguration Class

PlanetView에서 사용하는 Configuration(XDLConfiguration.xml)을 정의하는 클래스이다. XDLConfiguration.xml 환경설정을 읽어 정보를 확인할 수 있고, 설정된 정보를 XML 파일 형식으로 저장한다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NGRXConfiguration

Namespace:  Pixoneer.NXDL.NGR
Assembly:  NXDLgr (in NXDLgr.dll) Version: 2.0.3.31
Syntax
C#
public class XConfiguration : IDisposable

The XConfiguration type exposes the following members.

Constructors
  NameDescription
Public methodXConfiguration
XConfiguration클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Properties
  NameDescription
Public propertyBlueMarble
Planet 2D 혹은 3D에서 사용하는 전세계지도(BlueMarble) 파일 경로를 설정하거나 얻는다.
Public propertyConfigFilePath
라이브러리가 설치된 곳에 존재하는 Configuration 파일의 경로를 설정하거나 얻는다.
Public propertyDefaultPBEDataset
Planet 2D 혹은 3D에서 지형 DEM를 렌더링하기 PBE의 Data Source 경로 혹은 URL.
Public propertyDefaultPBIDataset
Planet 2D 혹은 3D에서 지형 Texture를 렌더링하기 PBI의 Data Source 경로 혹은 URL.
Public propertyDefaultPBPDataset
Planet 2D 혹은 3D에서 지형 지명 이름을 렌더링하기 PBP의 Data Source 경로 혹은 URL.
Public propertyDefaultPBVDataset
Planet 2D 혹은 3D에서 지형 벡터 데이터를 렌더링하기 PBV의 Data Source 경로 혹은 URL.
Public propertyMaxTileCount
Planet 2D 혹은 3D에서Tile을 메모리에 적재하기 위한 메모리 Cache(Tile 영역의 수)를 의미.
Public propertyPBEGroups
Configuration에 존재하는 PBE(Pixoneer Base Elevation) Data Source에 대한 XPBTDataGroup들을 포함하는 ArrayList 객체를 얻는다.
Public propertyPBIGroups
Configuration에 존재하는 PBI(Pixoneer Base Image) Data Source에 대한 XPBTDataGroup들을 포함하는 ArrayList 객체를 얻는다.
Public propertyPBPGroups
Configuration에 존재하는 PBP(Pixoneer Base Placename) Data Source에 대한 XPBTDataGroup들을 포함하는 ArrayList 객체를 얻는다.
Public propertyPBVGroups
Configuration에 존재하는 PBV(Pixoneer Base Vector) Data Source에 대한 XPBTDataGroup들을 포함하는 ArrayList 객체를 얻는다.
Public propertyPlanet2DProjection
Planet 2D 투영방식 문자열.
가능한 문자열 : WEBMERCATOR 또는 EEC
Public propertyRenderType
NXDL의 각종 View컨트롤들이 Render를 수행하기 위한 타입 ( OpenGL만 가능).
Public propertyShaderVersion
GroundEffect, SkyEffect, LightingEffect 등의 렌더링 쉐이더 버전
(1 : 최신, 0 : 텍스처 렌더링 + light effect가 적용되지 않는 밤/낮 효과(이전 렌더링) )
Top
Methods
  NameDescription
Public methodGetMaxID
내부에 정의된 PBI 그룹 객체의 ID 중 가장 큰 ID를 얻는다.
Public methodLoadConfigFile
특정 파일 경로의 Configration 환경설정 내용을 읽는다.
Public methodStatic memberLoadCurrentConfig
현재 엔진의 기본 설정을 로딩한다.
Public methodSaveConfigFile
설정 내용을 파일로 저장한다.
Public methodUpdateCurrentConfig
설정된 내용을 현재 엔진의 기본 설정값으로 설정한다.
Top
Examples
This is example for each RPF TOC settings
XConfiguration config = new XConfiguration();
if (config.LoadConfigFile(strXDLConfigurationPath) == false)
{
    MessageBox.Show("XDLConfiguration.xml Load Failed", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    return;
}

string strTocFull = string.Empty;

foreach (XPBTDataGroup group in config.PBIGroups)
{
    foreach (XPBTDataSource src in group.Sources)
    {
        if (src.URL.IndexOf(".toc") >= 0)
        {
            nRPFGroupID = group.ID;
            strTocFull = src.URL;
            break;
        }
    }
    if (strTocFull != string.Empty )
        break;
}
if (strTocFull == string.Empty)
{
    MessageBox.Show("Can`t Find RPF Source in XDLConfiguration.xml", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    return;
}

int nTokenIndex = strTocFull.IndexOf(".toc");
if (nTokenIndex < 0)
{
    MessageBox.Show("Can`t Not Find *.Toc File in XDLConfiguration.xml", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    return;
}
while (nTokenIndex > 0)
{
    string strTocFile = strTocFull.Substring(0, nTokenIndex+4);
    if (strTocFile != string.Empty)
    {
        ListToc.Items.Add(strTocFile.ToLower());
    }
    if( strTocFull.Length > nTokenIndex+5 )
        strTocFull = strTocFull.Substring(nTokenIndex+5);
    else
        strTocFull = strTocFull.Substring(nTokenIndex + 4);
    nTokenIndex = strTocFull.IndexOf(".toc");
}
See Also