Main Content


Collect blocks of blocked point cloud into workspace

Since R2022a



[ptCloud,ptAttr] = gather(bpc) collects all the blocks and their point attributes from the blockedPointCloud object bpc, and assembles the blocks into a pointCloud object, ptCloud, and the point attributes into a lidarPointAttributes object, ptAttr.


collapse all

Create a blocked point cloud from a LAZ file.

pcfile = fullfile(toolboxdir("lidar"),"lidardata", ...
bpc = blockedPointCloud(pcfile,[50 50]);

Collect the blocks and point attributes of the blocked point cloud, and assemble them into a pointCloud object and lidarPointAttributes object, respectively.

[ptCloud,ptAttr] = gather(bpc);

Display the assembled point cloud. Specify the color based on the classification attributes.


Input Arguments

collapse all

Blocked point cloud, specified as a blockedPointCloud object.

Output Arguments

collapse all

Assembled point cloud, returned as a pointCloud object.


When the class of underlying source of input blocked point clouds is "struct", then the function returns an array of structures instead of pointCloud object. The size of array matches the SizeInBlocks property value of input blocked point clouds.

Since R2024a

Assembled point attributes, returned as a lidarPointAttributes object.

Version History

Introduced in R2022a

expand all