This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > GeoDatabaseExtensions > ESRI.ArcGIS.GeoDatabaseExtensions > Interfaces > IL > ILasPointEdit Interface > ILasPointEdit.ChangeClassCode Method (ArcObjects .NET 10.5 SDK) |
Replace points' class code.
[Visual Basic .NET] Public Sub ChangeClassCode ( _ ByVal pTrackCancel As ITrackCancel, _ ByVal FileIndex As Integer, _ ByVal pExistingCodes As ILongArray, _ ByVal pNewCodes As ILongArray, _ ByVal bCalculateStats As Boolean _ )
[C#] public void ChangeClassCode ( ITrackCancel pTrackCancel, int FileIndex, ILongArray pExistingCodes, ILongArray pNewCodes, bool bCalculateStats );
[C++]
HRESULT ChangeClassCode(
ITrackCancel* pTrackCancel,
long FileIndex,
ILongArray* pExistingCodes,
ILongArray* pNewCodes,
VARIANT_BOOL bCalculateStats
);
[C++]
Parameters pTrackCancel [in]
pTrackCancel is a parameter of type ITrackCancel FileIndex [in] FileIndex is a parameter of type long pExistingCodes [in]
pExistingCodes is a parameter of type ILongArray pNewCodes [in]
pNewCodes is a parameter of type ILongArray bCalculateStats [in] bCalculateStats is a parameter of type VARIANT_BOOL
ChangeClassCode is used to change the class codes for points in las files. Consider using this method to update the classification of points in LAS files generated prior to the introduction of standardized class codes in the LAS 1.1 specifications.
pTrackCancel references a CancelTracker that can be used to stop the process. This can be set to NULL if the ability for the user to cancel isn't required.
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.
pExistingCodes is the array of input class codes that need to be modified.
pNewCodes is the array of new class codes that the points will be updated to. The array lengths of pExistingCodes and pNewCodes should be the same. There is a one to one relation between the two array elements. Points with a class code value that is present in the first index location of pExistingCodes will be updated to have a new class code value that is present in the first index location of the pNewCodes array.
bCalculateStats informs the las dataset whether or not to (re)generate the las file statistics after performing the edit. If no further edits will be made to the las file, and statistics exist but will be invalidated with this call, or are desired to be made from scratch, then set this to TRUE. Otherwise, set it to FALSE to avoid an unnecessary expense.
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.