ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ClassFlag Class
Members Example

In This Topic
    ClassFlag Class
    In This Topic
    Represents a classification flag for a point cloud filter.
    Syntax
    public class ClassFlag 
    Public Class ClassFlag 
    Remarks
    When a classification is carried out on lidar data, points may fall into more than one category of the classification. Classification flags are used to provide a secondary description or classification for lidar points.
    Example
    Update the ClassFlags for PointCloudSceneLayer
    //Must be called on the MCT
    //var pcsl = ...;
    var filters = pcsl.GetFilters();
    PointCloudFilterDefinition fdef = null;
    if (filters.Count() == 0)
    {
      fdef = new PointCloudFilterDefinition()
      {
        //7 is "edge of flight line" - exclude
        ClassFlags = new List<ClassFlag> { 
           new ClassFlag(7, ClassFlagOption.Exclude) }
      };
    }
    else
    {
      fdef = PointCloudFilterDefinition.FromCIM(filters);
      //keep any include or ignore class flags
      var keep = fdef.ClassFlags.Where(
             cf => cf.ClassFlagOption != ClassFlagOption.Exclude).ToList();
      //7 is "edge of flight line" - exclude
      keep.Add(new ClassFlag(7, ClassFlagOption.Exclude));
      fdef.ClassFlags = keep;
    }
    //apply
    pcsl.SetFilters(fdef.ToCIM());
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.ClassFlag

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also