This document is archived and information here might be outdated. Recommended version. |
Set points' class code.
[Visual Basic .NET] Public Sub EditClassCode ( _ ByVal FileIndex As Integer, _ ByVal pPointIDs As IDoubleArray, _ ByVal pCodes As ILongArray, _ ByRef pbHasChange As Boolean _ )
[C#] public void EditClassCode ( int FileIndex, IDoubleArray pPointIDs, ILongArray pCodes, ref bool pbHasChange );
[C++]
HRESULT EditClassCode(
long FileIndex,
IDoubleArray* pPointIDs,
ILongArray* pCodes,
Boolean* pbHasChange
);
[C++]
Parameters FileIndex [in]
FileIndex is a parameter of type long pPointIDs [in]
pPointIDs is a parameter of type IDoubleArray* pCodes [in]
pCodes is a parameter of type ILongArray* pbHasChange [out]
pbHasChange is a parameter of type bool*
EditClassCode is used to change the class code for a set of points in the las dataset. Consider using this method when you are editing the class codes of a handful of points.
fileIndex is the index to the specific las file, as referenced by the las dataset, that will be modified. Valid fileIndex values range from 0 .. ILasDataset.FileCount-1.
pPointIDs is the array of point indices for which the class codes and/or class flags need to be changed. These IDs are 1 based.
pCodes is the array of new class codes that the points will be updated to. The array lengths of pPointIDs and pCodes should be the same. There is a one to one relation between the two array elements. The first point in the pPointIDs array will be assigned with the class code value at the first index location of the pCodes array.
pBHasChange indicates whether atleast one change has been made to the input set of points. If all the input points already has the same class codes as specified by the input pCodes arguments, no edits will be made to the points and pBHasChange will be false.
Notes:
This method edits the las files containing the points. There is no support for undo. Consider the need to backup your las files before calling ILasPointEdit methods.