pchandler.data_io

Public API for pchandler.data_io.

Re-exports the per-format handler classes (Csv, E57, Las, Ply) via the lazy __getattr__ mechanism so optional file-format dependencies are not pulled in at import time.

pchandler.data_io.Csv

alias of CsvHandler

pchandler.data_io.E57

alias of E57Handler

pchandler.data_io.Las

alias of LasHandler

pchandler.data_io.Ply

alias of PlyHandler

pchandler.data_io.find_point_cloud_in_directory(directory_path, pcd_file_types=SUPPORTED_TYPES, include_subdirectories=True)

Search a directory for point cloud files with specific extensions.

Parameters:
  • directory_path (Path) – Path of directory to search.

  • pcd_file_types (list[str]) – List of extension names (e.g. [‘.ply’, ‘.las’, ‘.txt’]).

  • include_subdirectories (bool, default=True) – Flag to include a subdirectory search

Return type:

list[Path]

pchandler.data_io.load_file(file_path, **kwargs)

Load a point cloud from disk by dispatching on the file suffix.

Recognised suffixes are listed in SUPPORTED_TYPES (.las / .laz / .txt / .asc / .csv / .pts / .e57 / .ply).

Parameters:
  • file_path (str | Path) – Path to the point-cloud file to load.

  • **kwargs (Any) – Additional keyword arguments forwarded to the per-format handler’s load method.

Returns:

The loaded point cloud.

Return type:

PointCloudData

Raises:

ValueError – If the file’s suffix is not in SUPPORTED_TYPES.

Modules

core

Base module for I/O handlers and supporting helper methods.

csv

CSV / ASCII file-format handler class.

e57

E57 file-format handler class.

las

LAS/LAZ file-format handler class.

pcd

PCD file-format handler class (not yet implemented).

ply

PLY file-format handler class.

util

Top-level convenience loader that dispatches to the per-format handler by suffix.