ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / LasPointCursor Class / MoveNextArray Method
The array of ArcGIS.Core.Geometry.Coordinate3D to populate.
The array of LasPoint.Intensity properties to populate. If you don't want to get the intensities, pass null.
The array of LasPoint.FileIndex properties to populate. If you don't want to get the file indices, pass null.
The array of LasPoint.PointID properties to populate. If you don't want to get the point IDs, pass null.
The number of points retrieved.
Example Version

MoveNextArray Method
Advances to the next set of LasPoint objects in this LasPointCursor. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public bool MoveNextArray( 
   Coordinate3D[] points,
   int[] intensities,
   int[] fileIndices,
   double[] pointIds,
   out int pointCount
)

Parameters

points
The array of ArcGIS.Core.Geometry.Coordinate3D to populate.
intensities
The array of LasPoint.Intensity properties to populate. If you don't want to get the intensities, pass null.
fileIndices
The array of LasPoint.FileIndex properties to populate. If you don't want to get the file indices, pass null.
pointIds
The array of LasPoint.PointID properties to populate. If you don't want to get the point IDs, pass null.
pointCount
The number of points retrieved.

Return Value

true if the cursor has successfully advanced to the next set; false if the cursor has passed the end of the collection.
Exceptions
ExceptionDescription
This instance has already called MoveNext. Call Reset before using this method.
The array of ArcGIS.Core.Geometry.Coordinate3D is null.
The array of ArcGIS.Core.Geometry.Coordinate3D is empty.
One of the other arrays (intensities, fileIndices, pointIds) is not null but is not the same size as points.
Example
Search using pre initialized arrays
// search all points
using (ArcGIS.Core.Data.Analyst3D.LasPointCursor ptCursor = lasDataset.SearchPoints(null))
{
  int count;
  Coordinate3D[] lasPointsRetrieved = new Coordinate3D[10000];
  while (ptCursor.MoveNextArray(lasPointsRetrieved, null, null, null, out count))
  {
    var points = lasPointsRetrieved.ToList();
  
    // ...
  }
}

// search within an extent
// use MoveNextArray retrieving coordinates, fileIndex and pointIds
ArcGIS.Core.Data.Analyst3D.LasPointFilter filter = new ArcGIS.Core.Data.Analyst3D.LasPointFilter();
filter.FilterGeometry = envelope;
using (ArcGIS.Core.Data.Analyst3D.LasPointCursor ptCursor = lasDataset.SearchPoints(filter))
{
  int count;
  Coordinate3D[] lasPointsRetrieved = new Coordinate3D[50000];
  int[] fileIndexes = new int[50000];
  double[] pointIds = new double[50000];
  while (ptCursor.MoveNextArray(lasPointsRetrieved, null, fileIndexes, pointIds, out count))
  {
    var points = lasPointsRetrieved.ToList();

  }
}
      
Search using pre initialized arrays
// search all points and process with a set size of array retrieving only coordinates
using (ArcGIS.Core.Data.Analyst3D.LasPointCursor ptCursor = lasDatasetLayer.SearchPoints(null))
{
  int count;
  Coordinate3D[] lasPointsRetrieved = new Coordinate3D[10000];
  while (ptCursor.MoveNextArray(lasPointsRetrieved, null, null, null, out count))
  {
    var points = lasPointsRetrieved.ToList();

    // ...
  }
}

// search within an extent
// use MoveNextArray retrieving coordinates, fileIndex and pointIds
ArcGIS.Core.Data.Analyst3D.LasPointFilter filter = new ArcGIS.Core.Data.Analyst3D.LasPointFilter();
filter.FilterGeometry = envelope;
using (ArcGIS.Core.Data.Analyst3D.LasPointCursor ptCursor = lasDatasetLayer.SearchPoints(filter))
{
  int count;
  Coordinate3D[] lasPointsRetrieved = new Coordinate3D[50000];
  int[] fileIndexes = new int[50000];
  double[] pointIds = new double[50000];
  while (ptCursor.MoveNextArray(lasPointsRetrieved, null, fileIndexes, pointIds, out count))
  {
    var points = lasPointsRetrieved.ToList();

  }
}
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.4 or higher.
See Also