Main Content

partition

Partition blockedPointCloudDatastore

    Description

    example

    subbpcds = partition(bpcds,n,index) partitions the blocked point cloud datastore bpcds into the specified number of parts n, and returns the partition corresponding to the specified index index.

    Examples

    collapse all

    Create a blocked point cloud.

    pcfile = fullfile(toolboxdir("lidar"),"lidardata", ...
                           "las","aerialLidarData.laz");
    bpc = blockedPointCloud(pcfile,[300 300]);

    Create a blockedPointCloudDatastore from the blocked point cloud.

    bpcds = blockedPointCloudDatastore(bpc);

    Partition the blocked point cloud datastore into two partitions, and create a new blockedPointCloudDatastore object from the data in the first partition.

    bpcdsp1 = partition(bpcds,2,1);

    Read data and metadata from the first partition. Display the metadata.

    while hasdata(bpcdsp1)
          [data,info] = read(bpcdsp1);
          disp(info)
    end
                    ROI: [4.2975e+05 4.3005e+05 3.6798e+06 3.6801e+06 ... ]
               PCNumber: 1
        PointAttributes: [1x1 lidarPointAttributes]
              BlockSize: [300 300 53.0300]
    

    Input Arguments

    collapse all

    Blocked point cloud datastore, specified as a blockedPointCloudDatastore object.

    Number of partitions, specified as a numeric scalar. To estimate a reasonable value for N, use the numpartitions function.

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

    Partition to read, specified as a numeric scalar.

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical

    Output Arguments

    collapse all

    Partitioned subset of the datastore, returned as a blockedPointCloudDatastore object.

    Version History

    Introduced in R2022a