point_formats/lib.rs
1//! `point-formats` is a dependency-light crate for converting among
2//! common LiDAR, point-cloud, and simple mesh interchange formats.
3//!
4//! The crate deliberately separates two concerns:
5//!
6//! * **Native codecs** for formats that can be implemented portably in safe Rust
7//! without large native libraries: XYZ/TXT/CSV, PTS/PTX, PLY, PCD, OBJ, and STL.
8//! * **Adapter-ready formats** such as LAS/LAZ/COPC/E57/GeoTIFF/ROS bags/vendor
9//! packets, which are represented in the API and return explicit errors until
10//! a downstream adapter registers a codec.
11//!
12//! # Example
13//!
14//! ```no_run
15//! use point_formats::{convert_path, ConvertOptions};
16//!
17//! let report = convert_path(
18//! "scan.xyz",
19//! "scan.ply",
20//! &ConvertOptions::default(),
21//! )?;
22//! println!("wrote {} points", report.points_written);
23//! # Ok::<(), point_formats::Error>(())
24//! ```
25
26pub mod adapters;
27pub mod convert;
28pub mod error;
29pub mod format;
30pub mod io;
31pub mod types;
32
33pub use convert::{convert_path, ConversionReport, ConvertOptions, GeometryPolicy};
34pub use error::{Error, Result};
35pub use format::{Format, FormatFamily, FormatSupport};
36pub use types::{
37 AttributeValue, Bounds3, Color, Face, Geometry, Mesh, Metadata, Point, PointCloud, Vec3, Vertex,
38};