ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LasDatasetLayer Class / CanClassifyLasPoints Method
The set of classification edits to apply.
Example

In This Topic
    CanClassifyLasPoints Method
    In This Topic
    Determines whether the specified classification edit can be performed on this LAS dataset layer. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function CanClassifyLasPoints( _
       ByVal editDescription As LasPointClassificationDescription _
    ) As Boolean
    public bool CanClassifyLasPoints( 
       LasPointClassificationDescription editDescription
    )

    Parameters

    editDescription
    The set of classification edits to apply.

    Return Value

    A boolean indicating that edits can be applied.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run
    Remarks
    It is important to call this method prior to ClassifyLasPoints to ensure the parameters are valid.

    > This method checks that a selection exists, and that the ClassCode is a valid value for the layer (that is; it is not a value greater than the maximum allowable classification code for the layer).

    Example
    Classify LAS Points
    // build the LasPointClassificationDescription
    // assign a new classification code to be assigned to the selected LAS points
    // don't alter any of the classification flags
    var edits = new LasPointClassificationDescription();
    edits.ClassCode = 6;
    
    if (lasDatasetLayer.CanClassifyLasPoints(edits))
      lasDatasetLayer.ClassifyLasPoints(edits, true);
    
    
    // alternatively set up the LasPointClassificationDescription to modify classification flags
    var edits2 = new LasPointClassificationDescription();
    edits2.KeyPoints = LasClassFlagEditType.Set;
    edits2.SyntheticPoints = LasClassFlagEditType.Clear;
    // don't change the OverlapPoints, WithheldPoints flags
    
    // apply the edit
    if (lasDatasetLayer.CanClassifyLasPoints(edits2))
      lasDatasetLayer.ClassifyLasPoints(edits2, true);
    
    
    
    // or perform both a classification code and classification flag edit
    var edits3 = new LasPointClassificationDescription();
    edits3.ClassCode = 5;
    edits3.KeyPoints = LasClassFlagEditType.Set;
    edits3.SyntheticPoints = LasClassFlagEditType.Clear;
    // be explicit about not changing the other flags
    edits3.WithheldPoints = LasClassFlagEditType.NoChange;
    edits3.OverlapPoints = LasClassFlagEditType.NoChange;
    
    // apply the edit
    if (lasDatasetLayer.CanClassifyLasPoints(edits3))
      lasDatasetLayer.ClassifyLasPoints(edits3, true);
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.7 or higher.
    See Also