Click or drag to resize
XDL

XVectorIO Class

XVectorIO 클래스는 다양한 형식의 벡터파일(shp, dxf 등)을 읽거나 저장할 수 있는 기능을 제공한다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NIOXVectorIO

Namespace:  Pixoneer.NXDL.NIO
Assembly:  NXDLio (in NXDLio.dll) Version: 2.0.3.31
Syntax
C#
public class XVectorIO : IDisposable

The XVectorIO type exposes the following members.

Constructors
  NameDescription
Public methodXVectorIO
XVectorIO클래스의 기본 생성자로서, 멤버변수를 초기화한다.
Top
Methods
  NameDescription
Public methodExport
표준 및 상용 포맷의 벡터 파일로 저장한다.
Public methodGetDriverKey
입력 인덱스에 의한 드라이버 파일 키워드를 반환한다.
Public methodGetFileInfo(String, Double, Double, Double, Double, Double, Double, XSpatialReference)
표준 및 상용 포맷의 벡터 파일 정보를 로딩한다.
Public methodGetFileInfo(String, String, XSpatialReference, Int32, ArrayList, ArrayList, ArrayList, ArrayList, ArrayList, ArrayList, ArrayList)
표준 및 상용 포맷의 벡터 파일 정보를 로딩한다.
Public methodGetFiltersForLoad
XVectorIO객체로부터 로딩이 가능한 필터를 얻는다. 이 필터 문자열은 열기 대화상자 등에서 사용할 수 있다.
Public methodGetFiltersForSave
XVectorIO객체로부터 저장이 가능한 필터를 얻는다. 이 필터 문자열은 저장 대화상자 등에서 사용할 수 있다.
Public methodInitialize
객체를 초기화하고 벡터 드라이버를 로딩한다.
Public methodIsExtensionExportSupported
출력(export) 기능에 특정 파일 형식을 지원하는지 확인한다.
Public methodIsExtensionImportSupported
입력(import) 기능에 특정 파일 형식을 지원하는지 확인한다.
Public methodIsKeyImportSupported
입력 기능에 특정 파일 형식을 지원하는지 확인한다.
Public methodLoadFile(String, String, XSpatialReference)
표준 및 상용 포맷의 벡터 파일을 로딩한다.
Public methodLoadFile(String, String, XSpatialReference, Boolean, Boolean)
표준 및 상용 포맷의 벡터 파일을 로딩한다.
Top
Examples
Korea 2000 / Central belt 좌표계인 Shape 파일을 읽어 XScene 객체로 변환한 뒤 SML 파일로 저장하는 예제이다.
using Pixoneer.NXDL;
using Pixoneer.NXDL.NIO;
using Pixoneer.NXDL.NRS;
using Pixoneer.NXDL.NCC;
using Pixoneer.NXDL.NVC;
using Pixoneer.NXDL.NSCENE;

//Create Vector IO Manager
XVectorIO VectorIO = new XVectorIO();
String strError = "";
if (VectorIO.Initialize(out strError) == false)
{
    return;
}

// Create spatial reference of input vector file.
XSpatialReference srIn = new XSpatialReference();
srIn.importFromEPSG(5181); // Korea 2000 / Central belt
String strFilePathLoad = "D:\\Sample\\Vector_Sample\\sample.shp";
XvcBase vectorBase = VectorIO.LoadFile(strFilePathLoad, out strError, ref srIn);

// Convert XvcBase to XScene
 XScene sceneNew = Xsc.XvcBase2Scene(vectorBase, false, null);

// Save WGS 84 Scene object
string strExt = Path.GetExtension(strFilePathLoad);
string strPath = strFilePathLoad.Substring(0, strFilePathLoad.Length - strExt.Length);
strPath += ".sml";
XScene.SaveScene(sceneNew, strPath, null);
See Also