Skip to main content

Crate point_formats

Crate point_formats 

Source
Expand description

point-formats is a dependency-light crate for converting among common LiDAR, point-cloud, and simple mesh interchange formats.

The crate deliberately separates two concerns:

  • Native codecs for formats that can be implemented portably in safe Rust without large native libraries: XYZ/TXT/CSV, PTS/PTX, PLY, PCD, OBJ, and STL.
  • Adapter-ready formats such as LAS/LAZ/COPC/E57/GeoTIFF/ROS bags/vendor packets, which are represented in the API and return explicit errors until a downstream adapter registers a codec.

§Example

use point_formats::{convert_path, ConvertOptions};

let report = convert_path(
    "scan.xyz",
    "scan.ply",
    &ConvertOptions::default(),
)?;
println!("wrote {} points", report.points_written);

Re-exports§

pub use convert::convert_path;
pub use convert::ConversionReport;
pub use convert::ConvertOptions;
pub use convert::GeometryPolicy;
pub use error::Error;
pub use error::Result;
pub use format::Format;
pub use format::FormatFamily;
pub use format::FormatSupport;
pub use types::AttributeValue;
pub use types::Bounds3;
pub use types::Color;
pub use types::Face;
pub use types::Geometry;
pub use types::Mesh;
pub use types::Metadata;
pub use types::Point;
pub use types::PointCloud;
pub use types::Vec3;
pub use types::Vertex;

Modules§

adapters
Adapter traits for heavyweight or vendor formats.
convert
error
format
io
Native readers and writers.
types