Main Content

Read Point Cloud Data from LAZ File

This example shows how to read and visualize point cloud data from a LAS / LAZ file.

Create a lasFileReader object for a LAZ file. Then, use the readPointCloud function to read point cloud data from the LAZ file and generate a pointCloud object.

Create a lasFileReader object to access the LAZ file data.

filepath = fullfile(toolboxdir("lidar"),"lidardata", ...
    "las","aerialLidarData.laz");
lasReader = lasFileReader(filepath);

Read point cloud data from the LAZ file using the readPointCloud function.

ptCloud = readPointCloud(lasReader);

Visualize the point cloud.

figure
pcshow(ptCloud.Location)

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