// 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();
}
}