An XYZ file and a LAS file can hold exactly the same points. The difference is in everything around them. LAS is a specification: every value has a defined place, type and meaning, and the file carries its own description. XYZ is a convention: a line of numbers, the first three of which are coordinates. The one-line version is that LAS says what its numbers are; XYZ leaves that to whoever reads it.
Field by field
| XYZ / PTS / CSV | LAS / LAZ | |
|---|---|---|
| Structure | One line of text per point | A binary header, records and a fixed record layout |
| Column meaning | Optional header row; otherwise convention | Defined by the point format |
| Point count | Unknown until read (PTS states it) | In the header |
| Coordinates | Decimal text, as many digits as written | 32-bit integers × a scale + an offset |
| Coordinate system | None; sometimes a separate .prj | WKT or GeoTIFF keys inside the file |
| Intensity, colour | Any column, any range | 16-bit fields, fixed range |
| Classification | Possible, as a column | Standard ASPRS codes |
| Returns, GPS time | Possible, as columns | Standard fields |
| Other attributes | As many columns as wanted | Extra bytes, described in a record |
| Size (5.85 M points) | 568 MB as CSV | 211 MB as LAS, 36 MB as LAZ |
| Readable in a text editor | Yes | No |
When text is the right container
When a person or a simple program has to read it directly. A dozen control points, a sample to paste into a report, input to a script that only needs three numbers per line — for those, text costs nothing and needs no library. It is also the lowest common denominator: when two systems share no other point cloud format, they almost always share this one.
Past a few thousand points those advantages are gone. The file is several times the size, slower to read because every number has to be parsed, and only meaningful alongside a note of what the columns, units and coordinate system are.
What a conversion has to decide
Going from LAS to text is mostly mechanical: write the fields out, with care over the digits and the colour range, as the LAS to XYZ converter does. Going from text to LAS is not, because LAS insists on answers the text never gave.
- What each column is. From the header if there is one; otherwise from position and values. A wrong answer is not an error message, it is a cloud with intensity in the colour channel.
- The scale. LAS stores coordinates as integers, so a step size has to be chosen. The right one is the finest the text uses: 0.001 for three decimals, 0.01 for two. Longitude and latitude in degrees need something like 0.0000001; stored at 0.001 they round to the nearest hundred metres.
- The value ranges. LAS colour and intensity are 16-bit. Text colour on 0–255 has to be lifted, on 0–1 scaled, on 16 bits left alone — and the text does not say which it is.
- The coordinate system. Copied from a
.prjwhen there is one; otherwise none, rather than a guess. - What to do with lines that do not parse. A missing value or a
nancannot become a LAS record. Dropping them is unavoidable; dropping them without saying so is not.
Converting here
The XYZ to LAS converter makes each of those decisions in the open. It shows the columns with what each was read as, the precision and the coordinate system it will write, lets you change any column before anything is written, and reports skipped lines by line number afterwards. The XYZ viewer shows the same columns in 3D, so a wrong guess is visible before it is converted. The output opens in the LAS inspector for a look at the header it was given. All of it runs in the browser, and nothing is uploaded.