Click or drag to resize
XDL

XvcBase Class

여러 개의 XvcLayer를 관리한다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NVCXvcBase

Namespace: Pixoneer.NXDL.NVC
Assembly: NXDLvc (in NXDLvc.dll) Version: 2.0.3.38
Syntax
C#
public class XvcBase : IDisposable

The XvcBase type exposes the following members.

Constructors
 NameDescription
Public methodXvcBase XvcBase 객체를 생성하고 데이터 멤버를 초기화한다. 기본 생성자.
Public methodXvcBase(XvcBase*) XvcBase의 새로운 인스턴스를 입력 값(C++ XvcBase)을 통해 초기화한다.
Top
Properties
 NameDescription
Public propertyVisible 객체의 도시여부를 확인하거나 설정한다.
Top
Methods
 NameDescription
Public methodAddHead 머리 위치에 레이어를 추가한다.
Public methodAddTail 꼬리 위치에 레이어를 추가한다.
Public methodCalcRange 경계 영역을 계산한다.
Public methodFindIndex 0부터 시작하는 순서로 지정된 객체의 위치를 가져온다.
Public methodGetBoundRect 경계 영역의 최소/최대값을 가져온다.
Public methodGetHeadLayer 머리 위치에 있는 레이어를 가져온다.
Public methodGetHeadLayerPos 머리 위치에 있는 레이어 위치값를 가져온다.
Public methodGetLayer 특정 위치에 있는 레이어를 가져온다.
Public methodGetLayerPos XvcLayer 객체의 위치값을 가져온다.
Public methodGetNextLayerPos 특정 위치 다음에 있는 레이어 위치값을 가져온다.
Public methodGetNumLayers XvcBase에 포함되어 있는 레이어의 개수를 가져온다.
Public methodGetPrevLayerPos 특정 위치 이전에 있는 레이어 특정 위치값을 가져온다.
Public methodGetSR 지리 참조 좌표계를 가져온다.
Public methodGetTailLayerPos 꼬리 위치에 있는 레이어 위치값을 가져온다.
Public methodHitTest 특정 위치에 대해 객체가 선택되는지 테스트를 수행한다.
Public methodCode exampleLoadFile 외부 파일로부터 XvcBase를 로딩한다.
Public methodNormalize 객체를 정규화한다.
Public methodRemoveAll 모든 레이어를 삭제한다.
Public methodRemoveLayerPos 특정 위치에 레이어를 삭제한다.
Public methodCode exampleSaveFile 외부 파일로 XvcBase 객체를 저장한다.
Public methodSetSR 지리 참조 좌표계를 설정한다.
Top
Example
XvcBase객체에 있는 각 XvcLayer 객체를 가져온다.
C#
using Pixoneer.NXDL;
using Pixoneer.NXDL.NIO;
using Pixoneer.NXDL.NRS;
using Pixoneer.NXDL.NCC;
using Pixoneer.NXDL.NVC;

//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(4326); // Geographic Lat/Lon (WGS84)
String strFilePathLoad = "D:\\Sample\\Vector_Sample\\sample.shp";
XvcBase vectorBase = VectorIO.LoadFile(strFilePathLoad, out strError, ref srIn);
if (vectorBase != null)
{
    long layerPos = vectorBase.GetHeaderLayerPos();
    while (layerPos != 0)
    {
        XvcLayer vectorLayer = vectorBase.GetLayer(layerPos);
        if (vectorLayer != null)
        {
            long objPos = vectorLayer.GetHeadObjPos();
            while (objPos != 0)
            {
                XvcObj vectorObj = layer.GetObj(objPos);
                // do something
                // ...
                objPos = vectorLayer.GetNextObjPos(objPos);                    
            }
        }
        layerPos = vectorBase.GetNextLayerPos(layerPos);
    }
}
See Also