Expand description
Safe Rust bindings for the Esri LEPCC point-cloud compression library.
Note that Context is not Send + Sync — create one per thread / per decode call.
LEPCC (Limited Error Point Cloud Compression) is the codec used by the I3S PointCloud layer type to compress:
- XYZ — 3-D coordinates (
lepcc-xyzblobs) - RGB — 8-bit-per-channel colour (
lepcc-rgbblobs) - Intensity — 16-bit intensity (
lepcc-intensityblobs) - FlagBytes — per-point classification flags
§Usage
use lepcc_ffi::Context;
// Fetch LEPCC blob
let blob: Vec<u8> = todo!("fetch lepcc-xyz blob from I3S");
// Create a LEPCC context
let ctx = Context::new();
// Get blob info
let (blob_type, blob_size) = ctx.blob_info(&blob).unwrap();
// Decode blobs
let points: Vec<[f64; 3]> = ctx.decode_xyz(&blob).unwrap();
let colors: Vec<[u8; 3]> = ctx.decode_rgb(&blob).unwrap();
let intensity: Vec<u16> = ctx.decode_intensity(&blob).unwrap();
let flags: Vec<u8> = ctx.decode_flag_bytes(&blob).unwrap();
// Encode
let xyz_blob = ctx.encode_xyz(&points, 0.001).unwrap();
let rgb_blob = ctx.encode_rgb(&colors).unwrap();
let intensity_blob = ctx.encode_intensity(&intensity).unwrap();
let flag_bytes_blob = ctx.encode_flag_bytes(&flags).unwrap();Structs§
- Context
- RAII wrapper around a
lepcc_ContextHdl.
Enums§
- Lepcc
Error - Errors returned by LEPCC operations.