Click or drag to resize
XDL

XvcLayer Class

XvcObj를 상속받은 다양한 객체를 관리한다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NVCXvcLayer

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

The XvcLayer type exposes the following members.

Constructors
 NameDescription
Public methodXvcLayer XvcLayer 객체를 생성하고 데이터 멤버를 초기화한다. 기본 생성자.
Public methodXvcLayer(XvcLayer*) XvcLayer의 새로운 인스턴스를 입력 값(C++ XvcLayer)을 통해 초기화한다.
Top
Properties
 NameDescription
Public propertyID 레이어 ID를 가져오거나 설정한다.
Public propertyName 레이어 이름을 가져오거나 설정한다.
Public propertyVisible 레이어의 도시여부를 확인하고 설정한다.
Top
Methods
 NameDescription
Public methodAddHead 머리 위치에 객체를 추가한다.
Public methodAddTail 꼬리 위치에 객체를 추가한다.
Public methodCalcRange 경계 영역을 계산한다.
Public methodFindIndex 0부터 시작하는 순서로 지정된 객체의 위치를 가져온다.
Public methodGetHeadObjPos 머리 위치에 있는 객체의 위치값을 가져온다.
Public methodGetNextObjPos 다음 위치에 있는 객체의 위치값을 가져온다.
Public methodGetNumObjs 레이어에 있는 객체의 개수를 가져온다.
Public methodGetObj 특정 위치의 객체를 가져온다.
Public methodGetObjPos 객체의 위치값을 가져온다.
Public methodGetObjType 특정 위치의 객체 종류를 가져온다.
Public methodGetPrevObjPos 이전 위치에 있는 객체의 위치값을 가져온다.
Public methodGetTailObjPos 꼬리 위치에 있는 객체의 위치값을 가져온다.
Public methodHitTest 특정 위치에 객체가 있는지 hit-testing을 수행한다.
Public methodNormalize 객체를 정규화한다.
Public methodRemoveAll 레이어의 모든 객체를 삭제한다.
Public methodRemoveObjPos 특정 위치의 객체를 삭제한다.
Top
Example
XvcLayer 객체에서 XvcObj를 가져오는 예제
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