pub fn write_pcd(cloud: &PointCloud, path: &Path) -> Result<(), IoError>Expand description
Writes a cloud as binary PCD.
Binary rather than ascii: a million points in text is thirty megabytes of decimal digits and a lossy round trip unless every one is printed to seventeen significant figures.
§Why the coordinates are f64
PCL’s own point types are f32, and writing f32 here would be the
compatible choice. It is also wrong for the data this application
exists to handle: at a UTM northing of four million metres the f32
step is a quarter of a metre, and a survey written that way comes back
having moved further than the thing it was measuring. The storage keeps
f32 offsets from an f64 origin precisely to avoid that, and a
writer that flattens the two throws the invariant away at the last
step. The format allows SIZE 8; tools that only read f32 will say
so, which is better than silently rounding.