Skip to content
LidarKit

XYZ vs LAS

What a text point cloud leaves unsaid, what LAS states for it, and what has to be decided in between.

Published · Updated

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 / CSVLAS / LAZ
StructureOne line of text per pointA binary header, records and a fixed record layout
Column meaningOptional header row; otherwise conventionDefined by the point format
Point countUnknown until read (PTS states it)In the header
CoordinatesDecimal text, as many digits as written32-bit integers × a scale + an offset
Coordinate systemNone; sometimes a separate .prjWKT or GeoTIFF keys inside the file
Intensity, colourAny column, any range16-bit fields, fixed range
ClassificationPossible, as a columnStandard ASPRS codes
Returns, GPS timePossible, as columnsStandard fields
Other attributesAs many columns as wantedExtra bytes, described in a record
Size (5.85 M points)568 MB as CSV211 MB as LAS, 36 MB as LAZ
Readable in a text editorYesNo

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 .prj when there is one; otherwise none, rather than a guess.
  • What to do with lines that do not parse. A missing value or a nan cannot 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.

Frequently asked questions

Is LAS better than XYZ?
For storing and exchanging LiDAR, yes: LAS states what every value means, keeps the coordinate system inside the file, has standard classification codes, and as LAZ is around a fifteenth of the size. XYZ is better only where its plainness is the point — reading a few points by eye, or feeding a script or spreadsheet that knows nothing about LiDAR.
Does converting XYZ to LAS lose precision?
It should not. LAS stores coordinates as integers times a scale, and a conversion that picks the scale from the decimals the text uses keeps every digit: three decimals become a scale of 0.001 and are stored exactly. Precision is only lost when the scale is coarser than the file, or when coordinates in degrees are stored at a scale meant for metres.
What happens to columns LAS has no field for?
LAS has fixed fields for intensity, colour, classification, returns and GPS time. Columns that map onto none of those — normals, a custom score, a second intensity — have no standard place in point formats 6 and 7. The converter on this site shows every column before converting and says which ones will not be written.
Why is the LAS file so much smaller than my CSV?
Because a coordinate stored as text costs a byte per digit, and as LAS a fixed four bytes. Measured on one 5.85-million-point tile, the same points take 568 MB as CSV, 211 MB as LAS and 36 MB as LAZ, with every value identical.
Where does the coordinate system go?
Into the LAS file itself, as a WKT record, when the text came with a .prj file to take it from. A text point file has no place for one, so without the .prj there is nothing to copy, and inventing one would be worse than leaving it out.