ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / LasDataset Class / SearchPoints Method
Filter by parameters. See LasPointFilter. A null value will retrieve all points in the LAS dataset.
Thinning factor. Default value is 1.0.
Z factor. Default value is 1.0.
Example

In This Topic
    SearchPoints Method (LasDataset)
    In This Topic
    Retrieves the points in the LAS dataset that satisfy the criteria set in the filter. If no filter is set, all points will be retrieved. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function SearchPoints( _
       ByVal filter As LasPointFilter, _
       Optional ByVal thinningFactor As Double, _
       Optional ByVal zFactor As Double _
    ) As LasPointCursor

    Parameters

    filter
    Filter by parameters. See LasPointFilter. A null value will retrieve all points in the LAS dataset.
    thinningFactor
    Thinning factor. Default value is 1.0.
    zFactor
    Z factor. Default value is 1.0.

    Return Value

    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run
    The thinningFactor or zFactor value is invalid. Values cannot be NaN. In addition the thinningFactor must be greater than 0 and less than or equal to 1.
    Remarks
    To ensure maximum robustness, callers should explicitly dispose of the returned LasPointCursor in either a using statement or a finally block.
    Example
    Search LAS Points
    // search all points
    using (ArcGIS.Core.Data.Analyst3D.LasPointCursor ptCursor = lasDataset.SearchPoints(null))
    {
      while (ptCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.LasPoint point = ptCursor.Current)
        {
    
        }
      }
    }
    
    // search within an extent
    ArcGIS.Core.Data.Analyst3D.LasPointFilter pointFilter = new ArcGIS.Core.Data.Analyst3D.LasPointFilter();
    pointFilter.FilterGeometry = envelope;
    using (ArcGIS.Core.Data.Analyst3D.LasPointCursor ptCursor = lasDataset.SearchPoints(pointFilter))
    {
      while (ptCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.LasPoint point = ptCursor.Current)
        {
    
        }
      }
    }
    
    // search within an extent and limited to specific classsification codes
    pointFilter = new ArcGIS.Core.Data.Analyst3D.LasPointFilter();
    pointFilter.FilterGeometry = envelope;
    pointFilter.ClassCodes = new List<int> { 4, 5 };
    using (ArcGIS.Core.Data.Analyst3D.LasPointCursor ptCursor = lasDataset.SearchPoints(pointFilter))
    {
      while (ptCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.LasPoint point = ptCursor.Current)
        {
    
        }
      }
    }
    // 
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also