This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > GeoDatabaseExtensions > ESRI.ArcGIS.GeoDatabaseExtensions > Interfaces > IL > ILasPointEdit Interface > ILasPointEdit.SetClassFlag Method (ArcObjects .NET 10.4 SDK) |
Set points' classification flag.
[Visual Basic .NET] Public Sub SetClassFlag ( _ ByVal pTrackCancel As ITrackCancel, _ ByVal FileIndex As Integer, _ ByVal pAOI As Object, _ ByVal bufferDistance As Double, _ ByVal pZRange As IDoubleArray, _ ByVal pFilter As ILasAttributeFilter, _ ByVal newFlags As Integer, _ ByVal bClear As Boolean, _ ByVal bCalculateStats As Boolean _ )
[C#] public void SetClassFlag ( ITrackCancel pTrackCancel, int FileIndex, object pAOI, double bufferDistance, IDoubleArray pZRange, ILasAttributeFilter pFilter, int newFlags, bool bClear, bool bCalculateStats );
[C++]
HRESULT SetClassFlag(
ITrackCancel* pTrackCancel,
long FileIndex,
LPUNKNOWN pAOI,
double bufferDistance,
IDoubleArray* pZRange,
ILasAttributeFilter* pFilter,
long newFlags,
VARIANT_BOOL bClear,
VARIANT_BOOL bCalculateStats
);
[C++]
Parameters pTrackCancel [in]
pTrackCancel is a parameter of type ITrackCancel FileIndex [in] FileIndex is a parameter of type long pAOI [in] pAOI is a parameter of type LPUNKNOWN bufferDistance [in] bufferDistance is a parameter of type double pZRange [in]
pZRange is a parameter of type IDoubleArray pFilter [in]
pFilter is a parameter of type ILasAttributeFilter newFlags [in] newFlags is a parameter of type long bClear [in] bClear is a parameter of type VARIANT_BOOL bCalculateStats [in] bCalculateStats is a parameter of type VARIANT_BOOL
SetClassFlag is used to set or clear the bit encoded class flags for points in las files (i.e., the synthetic, key-point, and witheld bits). Spatial and attribute filters determine what points get modified.
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.
pAOI is the area of interest. Las points coincident or intersected by this area will potentially be modified. pAOI may be an individual point, polyline, or polygon geometry as well as a feature class containing one of these geometry types. If a feature class is specified then each shape it contains will be used as a separate area of interest. Passing individual geometries is best used in conjunction with interactive tools. Passing a feature class is the most efficient method when you have many pre-existing shapes that are to be used to set class flags. Z values of inputs are ignored. The pZRange parameter can be used to specify a height constraint.
bufferDistance modifies the input pAOI geometry. Each shape will be buffered by this amount. The result is used as the AOI. Negative buffers can be used on polygons. For no buffer give a distance of 0.0.
pZRange is a DoubleArray used to specify a height range that acts as an additional constraint to the pAOI. You can either provide a NULL pointer if you're not interested in filtering by height or a DoubleArray with two values representing zmin and zmax.
pFilter is a LasAttributeFilter that adds qualitiers to control what las points get operated on. In addition to satisfying the pAOI and pZRange qualifiers, input points would also need to pass through this filter. A NULL pointer can be used if this filter isn't needed.
newFlags indicates which flags for candidate las points will be changed. All three bit fields (i.e., synthetic, model-key, withheld) can be encoded into this one value. Use the constants defined in the esriLasClassFlag enumeration in combination with a bitwise OR operator to set which flags are to be modified. Those which are not set will be left as is.
bClear is a boolean that indicates whether to set or clear (i.e., turn on or off) the flags specified by the flagsToModify parameter. When set to FALSE the flag(s) will be turned on. When set to TRUE the flag(s) will be turned off.
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.