Leica does not publish a specification for PTS. The layout below is the one its
Cyclone software exports and that independent readers agree on; this page follows
PDAL’s reader (io/PtsReader.cpp) and Open3D’s reader and writer
(FilePTS.cpp).
The file
| Line | Contents |
|---|---|
| 1 | The number of points that follow, as a whole number |
| 2 onwards | One point per line, values separated by spaces |
- Plain ASCII text; lines end with CR LF (Open3D writes CR LF) or LF.
- Numbers use a full stop as decimal separator.
- The number of values on the first point line sets the layout for the whole file.
- Files exported scan by scan can hold several blocks, each starting with its own count line; PDAL and Open3D read only the first block.
- Units and coordinate system are not recorded in the file.
Column layouts
| Values | Layout | Readers |
|---|---|---|
| 3 | x y z | PDAL, Open3D |
| 4 | x y z intensity | PDAL, Open3D |
| 6 | x y z r g b | Open3D only; PDAL rejects it |
| 7 | x y z intensity r g b | PDAL, Open3D; the commonest layout |
| Field | Type | Meaning |
|---|---|---|
x, y, z | decimal | Position |
intensity | whole number, −2048 to 2047 | Return strength. PDAL adds 2048 to give 0 to 4095; Open3D ignores it and writes 0 |
r, g, b | whole numbers, 0 to 255 | Colour, usually taken from the scanner’s camera |
PDAL logs and skips a line with the wrong number of fields and sets a value it cannot read to 0; Open3D stops at such a line.
Worked example
3
1.204 0.551 2.010 -1024 128 120 110
1.206 0.553 2.011 -980 131 122 112
1.209 0.552 2.013 -1012 129 121 111
Related: PTX
Leica’s PTX export is a different text format: each scan starts with a header giving the grid size, the scanner position and axes, and transformation matrices, followed by the points in scan-grid order. It is not covered here.