Common forms
x y z
x y z r g b
x y z intensity
Some files include a header, delimiters other than spaces, additional columns, comments, or locale-dependent decimal notation. Unlike LAS or E57, an XYZ ASCII file often does not declare scale, offset, coordinate reference system, units, bounds, column meanings, or RGB range.
Practical reading sequence
- Open the file as a text stream.
- Read line by line rather than loading the full file.
- Detect or explicitly configure delimiter and column mapping.
- Skip headers, comments, blank lines, and invalid records safely.
- Parse coordinates and optional attributes.
- Apply an explicit unit or coordinate scale when required.
- Convert the record into the internal point representation.
- Send the point to preview sampling or export selection.
Conceptual parser
std::string line;
while (std::getline(file, line)) {
CloudPoint point;
if (!parseXYZLine(line, point))
continue;
point.x *= coordScaleToMeters;
point.y *= coordScaleToMeters;
point.z *= coordScaleToMeters;
processPoint(point);
}
The scale problem
The same numeric values can represent metres, millimetres, feet, or a local engineering coordinate system. Automatic guessing is risky. A robust workflow should display the inferred or configured interpretation and include it in the output report.
CloudCutter can stream XYZ ASCII efficiently, but the user must still confirm what the source columns and units mean. Simplicity of format does not guarantee certainty of interpretation.
Frequently asked questions about XYZ point clouds
What is an XYZ point-cloud file?
It is usually a text file containing at least X, Y and Z coordinates, often with optional columns such as RGB or intensity. There is no single universal XYZ schema.
Does XYZ define units or a coordinate reference system?
Usually not. Those meanings must come from project documentation, a header or explicit user configuration.
Can XYZ contain RGB?
Yes, but column order and value range must be interpreted correctly.
Can XYZ be converted to E57 or LAS?
Yes, after the columns, units and scale are known.