ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LasDatasetLayer Class / SelectAsync Method
A filter that determines the points that will be selected.
A combination method.
Example

In This Topic
    SelectAsync Method
    In This Topic
    Selects LAS points based upon the specified filter. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    selectionFilter
    A filter that determines the points that will be selected.
    method
    A combination method.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    Specify the VisiblePoints and ClassCodes to customize the points that can be selected.
    Example
    Select using LasPointSelectionFilter
    {
      // must be on MCT 
    
      // create the filter
      var filter = new LasPointSelectionFilter();
      // set the filter geometry
      // don't set VisiblePoints, ClassCodes - use the existing layer values
      filter.FilterGeometry = polygon;
    
      // perform the selection
      var selCount = await lasDatasetLayer.SelectAsync(filter, SelectionCombinationMethod.New);
    
      // set up a second filter and configure the VisiblePoints, ClassCodes
      // note that the ClassCodes is using only (4,5)
      // whereas the layers setting is (3,4,5)
      var filter2 = new LasPointSelectionFilter();
      filter2.VisiblePoints = true;
      filter2.ClassCodes = new List<int>() { 4, 5 };
      filter2.FilterGeometry = polygon;
    
      // perform the selection
      selCount = await lasDatasetLayer.SelectAsync(filter2, SelectionCombinationMethod.New);
    }
    Select using LasPointClusterSelectionFilter
    {
      // must be on MCT 
    
      var clusterFilter = new LasPointClusterSelectionFilter();
      clusterFilter.VisiblePoints = true;
      clusterFilter.ClassCodes = new List<int>();  // empty list means all classification codes
      clusterFilter.FilterGeometry = polygon;
    
      clusterFilter.SearchRadius = 0.5; // meters
      clusterFilter.MaximumNumberOfPoints = 500;
    
      var clusterSelCount = await lasDatasetLayer.SelectAsync(clusterFilter, SelectionCombinationMethod.New);
    }
    Select using LasPointPlaneSelectionFilter
    {
      // must be on MCT 
    
      var planeFilter = new LasPointPlaneSelectionFilter();
      planeFilter.VisiblePoints = true;
      planeFilter.ClassCodes = new List<int>();  // empty list means all classification codes
      planeFilter.FilterGeometry = polygon;
    
      planeFilter.ClusteringDistance = 0.3; // meters
      planeFilter.MaximumDistance = 500;
      planeFilter.PlaneTolerance = 0.152; // meters
    
      var planeSelCount = await lasDatasetLayer.SelectAsync(planeFilter, SelectionCombinationMethod.New);
    }
    Select using LasPointRailSelectionFilter
    {
      // must be on MCT 
    
      var railFilter = new LasPointRailSelectionFilter();
      railFilter.VisiblePoints = true;
      railFilter.ClassCodes = new List<int>();  // empty list means all classification codes
      railFilter.FilterGeometry = polygon;
    
      // configure a few of the properties and accept defaults for others
      railFilter.SearchRadius = 0.5; // meters
      railFilter.RailThickness = 0.2; // meters
      railFilter.MaximumLength = 225; // meters
    
      var railSelCount = await lasDatasetLayer.SelectAsync(railFilter, SelectionCombinationMethod.New);
    }
    Select using LasPointPipelineSelectionFilter
    {
      // must be on MCT 
    
      var pipelineFilter = new LasPointPipelineSelectionFilter();
    
      pipelineFilter.VisiblePoints = true;
      pipelineFilter.ClassCodes = new List<int>();  // empty list means all classification codes
      pipelineFilter.FilterGeometry = polygon;
    
      // configure a few of the properties and accept defaults for others
      pipelineFilter.ApplyWindCorrection = true;
      pipelineFilter.MinimumLength = 25;  // meters
    
      var pipelineSelCount = await lasDatasetLayer.SelectAsync(pipelineFilter, SelectionCombinationMethod.New);
    }
    Requirements

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

    ArcGIS Pro version: 3.6 or higher.
    See Also