Hello,
the famous T.......n software? Tarnation software? Tearstain software? Thickskin software?
(-;
Here we go. We can do this with LASlayers if both files have the same number of points and in the same order. A little example. First I create my "better" LiDAR file with slightly different coordinates and no classifications with las2las:
D:\LAStools\bin>las2las -i ..\data\fusa.laz ^
-set_classification 0 ^
-translate_xyz 0.01 0.01 0.01 ^
-o fusa_better.laz
Then I make sure that they are as different as I want them to be with lasdiff:
D:\LAStools\bin>lasdiff -i ..\data\fusa.laz -i fusa_better.laz
checking '..\data\fusa.laz' against 'fusa_better.laz'
different system_identifier: 'LAStools (c) by Martin Isenburg' 'LAStools (c) by rapidlasso GmbH'
different generating_software: 'lasclassify (110920) unlicensed' 'las2las (version 150803)'
different max_x: 277999.99 278000.04
different min_x: 277750 277750.05
different max_y: 6122499.99 6122500.04
different min_y: 6122250 6122250.05
different max_z: 64.35 64.4
different min_z: 42.21 42.26
headers have 8 differences.
x: 27799997 27800002
y: 612234220 612234225
z: 6435 6440
classification: 5 0
point 1 of 277573 is different
x: 27799997 27800002
y: 612234253 612234258
z: 6430 6435
classification: 5 0
point 2 of 277573 is different
x: 27799952 27799957
y: 612233974 612233979
z: 6309 6314
classification: 1 0
point 3 of 277573 is different
x: 27799955 27799960
y: 612234005 612234010
z: 6288 6293
classification: 1 0
point 4 of 277573 is different
x: 27799953 27799958
y: 612234041 612234046
z: 6300 6305
classification: 1 0
point 5 of 277573 is different
already 5 points are different ... shutting up.
277573 points are different.
both have 277573 points. took 0.808 secs.
Now I create my LAY file with the "classification layer" in two steps. First I create a helper LAZ file whose only difference is the empty classification layer:
D:\LAStools\bin>las2las -i ..\data\fusa.laz ^
-set_classification 0 ^
-o fusa_empty.laz
And then I use the LASlayers functionality to create the difference LAY file between the two files which will be only the classifications:
D:\LAStools\bin>laslayers -i fusa_empty.laz -i ..\data\fusa.laz -olay
A quick sanity check with lasview and laslayers confirms that the LAY file contains exactly the classifications.
D:\LAStools\bin>lasview -i fusa_empty.lay
D:\LAStools\bin>lasview -i fusa_empty.laz -ilay
D:\LAStools\bin>laslayers -i fusa_empty.laz
LASlayer 1 of 1
start_position 276
size 15367
type 1 (replace)
fields 256 (classification)
compression 2 (pointwise)
modification_mask 48 (system_identifier generating_software)
ignore_mask 0
header_size 44
modification size 64
ignore size 0
description size 53
description laslayers -i fusa_empty.laz -i ..\data\fusa.laz -olay
Now some trickery: We copy the LAY file so it can be used with the other file that has the better aligned coordinates:
D:\LAStools\bin>copy fusa_empty.lay fusa_better.lay
And voila ... lasview shows us it worked
D:\LAStools\bin>lasview -i fusa_better.laz
D:\LAStools\bin>lasview -i fusa_better.laz -ilay
So now we flatten the LAY file into the better LAZ file in a final run with laslayers:
D:\LAStools\bin>laslayers -i fusa_better.laz -ilay -o fusa_better_classified.laz
And make a final check.
D:\LAStools\bin>lasview fusa_better_classified.laz