Main Content

gather

Collect blocks of blocked point cloud into workspace

Since R2022a

Description

[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.

example

Examples

collapse all

Create a blocked point cloud from a LAZ file.

pcfile = fullfile(toolboxdir("lidar"),"lidardata", ...
  "las","aerialLidarData.laz");
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.

pcshow(ptCloud.Location,ptAttr.Classification)

Figure contains an axes object. The axes object contains an object of type scatter.

Input Arguments

collapse all

Blocked point cloud, specified as a blockedPointCloud object.

Output Arguments

collapse all

Assembled point cloud, returned as a pointCloud object.

Note

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