src.pcloud.point_cloud_factory_facade

Classes

PointCloudFactoryFacade()

class src.pcloud.point_cloud_factory_facade.PointCloudFactoryFacade
Author:

Alberto M. Esmoris Pena

Facade-like class offering methods to make point clouds.

static make_from_file(path)

Build a PointCloud from a given file path (either in the local file system or from a URL pointing to a LAS/LAZ file).

Parameters:

path (str) – Path to a file representing a point cloud (must be stored in LAS format). Alternatively, it can be a URL starting with “http://” or “https://”.

Returns:

Built PointCloud

Return type:

PointCloud

static make_from_arrays(X, F, y=None, header=None, fnames=None, scale=None, force_scale=False, logging=True)

Build a PointCloud from given arrays, and (optionally) header.

Parameters:
  • X – The matrix of coordinates.

  • F – The matrix of features.

  • y – The vector of classes.

  • header – The LAS header. If None, default header is used.

  • fnames – The name of each feature. If None, then features will be named f1,…,fn.

  • scale – The scale for the LAS header. It governs the spatial precision of the points. If None (default) it will be automatically determined from the coordinates (X).

  • force_scale (bool) – True to force the given scale even when a header is given, False (default) otherwise.

  • logging – Govern whether the logging system must be used (True`) or not (``False). In general (by default) it will be used. However, certain calls (e.g., multiprocessing calls) might fail when calling the LOGGING system from different processes. In these cases, it is necessary to disable logging.

Returns:

Built PointCloud

Return type:

PointCloud

static make_from_pcloud(pcloud)

Build a PointCloud from another point cloud. Note that the built point cloud is a copy from the given point cloud.

Parameters:

pcloud (PointCloud) – The point cloud to be copied.

Returns:

A copy of the given point cloud.

Return type:

PointCloud