Main Content

blockedPointCloud

Point cloud made from discrete blocks

Since R2022a

    Description

    A blockedPointCloud object is a point cloud made from discrete blocks. Use blocked point clouds when a point cloud is too large to fit into memory. With a blocked point cloud, you can perform processing without running out of memory.

    Creation

    Description

    bpc = blockedPointCloud(source,blockSize) creates a read-only blockedPointCloud object from the specified source source with the specified block size blockSize. The source can be a pointCloud object or the name of a file or folder that contains point cloud data.

    example

    bpcs = blockedPointCloud(sources,blockSize) creates an array of blockedPointCloud objects from multiple sources sources with the specified block size blockSize. The length of bpcs is equal to the number of sources in sources.

    bpc = blockedPointCloud(___,Name=Value) specifies the Adapter and AlternateFileSystemRoots properties using one or more name-value arguments.

    Input Arguments

    expand all

    Source of the point cloud data, specified as a pointCloud object, or as a character vector or string scalar specifying the name of a file or folder.

    The blockedPointCloud function supports these source formats:

    • Single LAS or LAZ file.

    • pointCloud object.

    • Name of file or folder that contains point cloud data.

    Sources of the point cloud data, specified as a cell array of character vectors, string array, or FileSet object. blockedPointCloud function creates an array of blockedPointCloud objects.

    Size of the blocks, specified as a scalar, a two-element row vector, or a three-element row vector. The value you specify determines which dimensions the function blocks the point cloud along.

    • Scalar — The function blocks the point cloud along the X-axis.

    • Two-element row vector — The function blocks the point cloud along the X- and Y-axes.

    • Three-element row vector — The function blocks the point cloud along the X-, Y- and Z-axes.

    Properties

    expand all

    Read and write interface for the blocked point cloud object, specified as one of these adapter objects.

    Source of Point Cloud DataAdapterDescription

    • Single LAS/LAZ file

    • FileSet object containing LAS/LAZ files

    LASStore blocks in a single LAS file

    • A pointCloud object.

    InMemoryStore blocks in a variable in main memory
    Name of the folder which is the output of the apply or write function, stored using LASBlocks adaptor.LASBlocksStores each block as a LAS file in a folder
    Name of the folder which is the output of the apply or write function, stored using MATBlocks adaptor.MATBlocksStores each block as a MAT file in a folder

    You can also create your own adapter using the lidar.blocked.Adapter class.

    To set this property, you must specify it at object creation.

    Example: Adapter=lidar.blocked.LAS

    Alternate file system path for the files specified in the source, specified as a string array, character vector, or cell array of character vectors containing one or more rows. Each row specifies a set of equivalent root paths.

    Example: AlternateFileSystemRoots=["Z:\datasets", "/mynetwork/datasets"]

    Data Types: char | string | cell

    Size of the blocks, specified as a scalar, a two-element row vector, or a three-element row vector. The value you specify determines which dimensions the function blocks the point cloud along.

    • Scalar — The function blocks the point cloud along the X-axis.

    • Two-element row vector — The function blocks the point cloud along the X- and Y-axes.

    • Three-element row vector — The function blocks the point cloud along the X-, Y- and Z-axes.

    Data Types: double

    This property is read-only.

    Class of underlying source, stored as a string scalar.

    Data Types: string

    This property is read-only.

    Number of points in the point cloud, stored as a positive integer.

    Data Types: double

    This property is read-only.

    Size expressed as the number of blocks, specified as a three-element row vector of positive integers. The element of the vector specify the number of blocks in the X-, Y- and Z-axes respectively. This property is dependent on the BlockSize property. The value includes partial blocks.

    Data Types: integer

    This property is read-only.

    Source of the point cloud data, specified as a pointCloud object, or as a character vector or string scalar specifying the name of a file or folder.

    Data Types: char | string

    This property is read-only.

    Range of coordinates along the X-axis, specified as a two-element row vector. The first and second elements represent the minimum and maximum values of point cloud coordinates along the X-axis, respectively.

    Data Types: double

    This property is read-only.

    Range of coordinates along the Y-axis, specified as a two-element row vector. The first and second elements represent the minimum and maximum values of point cloud coordinates along the Y-axis, respectively.

    Data Types: double

    This property is read-only.

    Range of coordinates along the Z-axis, specified as a two-element row vector. The first and second elements represent the minimum and maximum values of point cloud coordinates along the Z-axis, respectively.

    Data Types: double

    Object Functions

    applyProcess blocks of blocked point cloud
    blocksub2roiConvert block subscripts to ROI limits
    gatherCollect blocks of blocked point cloud into workspace
    getBlockRead specific block of blocked point cloud
    getRegionRead arbitrary region of blocked point cloud
    roi2blocksubConvert ROI to block subscripts
    writeWrite blocked point cloud data to new destination

    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]);

    Display the details of the blocked point cloud.

    disp(bpc)
      blockedPointCloud with properties:
    
       Read-only properties.
                 Source: "/mathworks/devel/bat/filer/batfs2566-0/Bdoc24b.2725827/build/runnable/matlab/toolbox/lidar/lidardata/las/aerialLidarData.laz"
                Adapter: [1x1 lidar.blocked.LAS]
           SizeInBlocks: [9 6 1]
                XLimits: [4.2975e+05 4.3015e+05]
                YLimits: [3.6798e+06 3.6801e+06]
                ZLimits: [72.7900 125.8200]
        ClassUnderlying: "pointCloud"
    
       Settable properties
              BlockSize: [50 50 53.0300]
    

    Version History

    Introduced in R2022a