Main Content


Read specific block of blocked point cloud

Since R2022a



ptCloud = getBlock(bpc,blocksub) returns the block specified by the subscript location blocksub.

[ptCloud,pointAttributes] = getBlock(___) returns additional point attribute information pointAttributes using the input arguments from the previous syntax, if the input is a LAZ or LAS file.


collapse all

Create a blocked point cloud from a LAZ file.

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

Display the size, in blocks, of the blocked point cloud.

     9     6     1

Read a specific block of the point cloud.

block = getBlock(bpc,[2,2,1]);

Plot the point cloud data of the specified block.


Input Arguments

collapse all

Blocked point cloud, specified as a blockedPointCloud object.

Block subscripts, specified as a three-element integer-valued row vector. Valid values for each element range from 1 to the value of the corresponding element in the SizeInBlocks property of bpc.

Example: [3 2 1]

Output Arguments

collapse all

Block of point cloud data, returned as a pointCloud object.

Point attributes, returned as a lidarPointAttributes object.

Version History

Introduced in R2022a