Translate Point Cloud

504 views
Skip to first unread message

Benjamin Hippe

unread,
Aug 8, 2018, 2:06:11 PM8/8/18
to LAStools - efficient tools for LiDAR processing
Hello everyone,

I am new to using LAStools and I am having issues in translating a las file. In a separate software I have moved and rotated my cloud to fit with other clouds. From this software I can see how far I have moved in X, Y, & Z directions, as well as the rotation. I have successfully rotated my cloud. I convert my translation from US feet in my drawing to meters for the translation. Here is the translation string that I am using.

las2las -i "C:\Users\Bhippe\Desktop\Clean\Roof ShadedROT.las" -translate_x 3099.587 -translate_y 1508.298 -translate_z 323.204 -odir "C:\Users\Bhippe\Desktop\Clean" -odix "X" -olas

Is there something that I am missing? Scaling? It just doesn't seem to get it where I need it.

Any help is greatly appreciated.

regards,

Ben

Benjamin Hippe

unread,
Aug 8, 2018, 3:13:38 PM8/8/18
to LAStools - efficient tools for LiDAR processing
I was finally able to translate and rotate this into place. Though I am still not certain if I am doing this all correctly. I almost appears that I lost some points but it could just be a level of display issue.

I used the following:

las2las -i "C:\Users\Bhippe\Desktop\Clean\Roof Shaded.las" -rotate_xy 292.80850773 0 0 -odir "C:\Users\Bhippe\Desktop\Clean" -odix "ROT" -olas

Then:

las2las -i "C:\Users\Bhippe\Desktop\Clean\Roof ShadedROT.las" -translate_xyz 3099.59298 1508.30114 323.20426 -reoffset 3099.59298 1508.30114 323.20426 -odir "C:\Users\Bhippe\Desktop\Clean" -odix "X" -olas

Report on Original File:

lasinfo (180731) report for 'C:\Users\Bhippe\Desktop\Clean\Roof Shaded.las'
reporting all LAS header entries:
file signature: 'LASF'
file source ID: 33995
global_encoding: 0
project ID GUID data 1-4: 00000000-0000-0000-0000-000000000000
version major.minor: 1.2
system identifier: 'PDAL'
generating software: 'PDAL 1.6.0 (810417)'
file creation day/year: 218/2018
header size: 227
offset to point data: 227
number var. length records: 0
point data format: 3
point data record length: 34
number of point records: 4565584
number of points by return: 4565584 0 0 0 0
scale factor x y z: 0.0000000241212 0.000000022476 0.000000016451
offset x y z: -8.6455 -19.409300000000002 -11.7797
min x y z: -8.645500183105469 -19.409299850463867 -11.77970027923584
max x y z: 15.475700378417969 3.066699981689453 4.671299934387207
WARNING: stored resolution of min_x not compatible with x_offset and x_scale_factor: -8.645500183105469
WARNING: stored resolution of min_y not compatible with y_offset and y_scale_factor: -19.409299850463867
WARNING: stored resolution of min_z not compatible with z_offset and z_scale_factor: -11.77970027923584
WARNING: stored resolution of max_x not compatible with x_offset and x_scale_factor: 15.475700378417969
WARNING: stored resolution of max_y not compatible with y_offset and y_scale_factor: 3.066699981689453
WARNING: stored resolution of max_z not compatible with z_offset and z_scale_factor: 4.671299934387207
reporting minimum and maximum for all LAS point record entries ...
X -8 1000000016
Y 7 999999999
Z -17 999999996
intensity 0 0
return_number 1 1
number_of_returns 1 1
edge_of_flight_line 0 0
scan_direction_flag 0 0
classification 0 0
scan_angle_rank 0 0
user_data 0 0
point_source_ID 0 0
gps_time 1532539538.172411 1532539822.107835
WARNING: range violates GPS week time specified by global encoding bit 0
Color R 17664 60416
G 17664 60416
B 17664 60416
WARNING: 2 points outside of header bounding box
number of first returns: 4565584
number of intermediate returns: 0
number of last returns: 4565584
number of single returns: 4565584
overview over number of returns of given pulse: 4565584 0 0 0 0 0 0
histogram of classification of points:
4565584 never classified (0)
WARNING: real max x larger than header max x by 0.000000
WARNING: real min x smaller than header min x by 0.000000

Report Final Output File:

lasinfo (180731) report for 'C:\Users\Bhippe\Desktop\Clean\Roof ShadedROTX.las'
reporting all LAS header entries:
file signature: 'LASF'
file source ID: 33995
global_encoding: 0
project ID GUID data 1-4: 00000000-0000-0000-0000-000000000000
version major.minor: 1.2
system identifier: 'LAStools (c) by rapidlasso GmbH'
generating software: 'las2las (version 180731)'
file creation day/year: 218/2018
header size: 227
offset to point data: 227
number var. length records: 0
point data format: 3
point data record length: 34
number of point records: 4565584
number of points by return: 4565584 0 0 0 0
scale factor x y z: 0.0000000241212 0.000000022476 0.000000016451
offset x y z: 3099.5929799999999 1508.30114 323.20425999999998
min x y z: 3081.7466722967256 1489.0980053283799 311.42455971502596
max x y z: 3104.006312584062 1514.619922258544 327.875559928889
reporting minimum and maximum for all LAS point record entries ...
X -739859862 182964885
Y -854383995 281134644
Z -716047674 283952339
intensity 0 0
return_number 1 1
number_of_returns 1 1
edge_of_flight_line 0 0
scan_direction_flag 0 0
classification 0 0
scan_angle_rank 0 0
user_data 0 0
point_source_ID 0 0
gps_time 1532539538.172411 1532539822.107835
WARNING: range violates GPS week time specified by global encoding bit 0
Color R 17664 60416
G 17664 60416
B 17664 60416
number of first returns: 4565584
number of intermediate returns: 0
number of last returns: 4565584
number of single returns: 4565584
overview over number of returns of given pulse: 4565584 0 0 0 0 0 0
histogram of classification of points:
4565584 never classified (0)


Martin Isenburg

unread,
Aug 9, 2018, 5:17:31 AM8/9/18
to LAStools - efficient command line tools for LIDAR processing
Hello,

my first suggestion is not to put spaces in file names or directory names. Use '_' instead.

(-:

On to your actual problem. It has to do with excessive storage resolution for point coordinates is - as so often - the culprit. This will then cause integer overflows in the LAS format. The format uses fixed-point notation that has an offset and a scale factor to provide storage efficient uniform sampling for the target area. But reasonable scale factors are important to avoid integer overflow. You data was stored using scale factors with eight decimal digits: 

scale factor x y z:         0.0000000241212 0.000000022476 0.000000016451

0.01 = cm
0.001 = mm
0.000001 = um (micrometers)
0.000000001 = nm (nanometeres)

hence your coordinates are stored as if they were accurate down to around 24 nm in x, 22 nm in y, and 16 nm in z. Unless your data set was produced with an electron microscope (or similar) you probably should reduce the resolution of coordinate storage to a reasonable unit such as mm. You can do this with the following call:

las2las -i Roof_Shaded.las ^
            -set_global_encoding_gps_bit ^
            -rescale 0.001 0.001 0.001 ^
            -auto_reoffset ^
            -o Better_Roof_Shaded.laz

lasinfo -i Better_Roof_Shaded.laz

now the lasinfo report should look much "nicer" and should not have all those WARNINGs and this should be your new "raw" original. For your translation I also rounded to millimeters because for most practical approaches that should suffice for data acquired with an (airborne? uav? mobile?) LiDAR scanner.

las2las -i Better_Roof_Shaded.laz ^
            -translate_xyz 3099.593 1508.301 323.204 ^
            -o Better_Roof_Shaded_Translated.laz

Regards,

Martin @rapidlasso


Benjamin Hippe

unread,
Aug 14, 2018, 5:50:47 PM8/14/18
to LAStools - efficient tools for LiDAR processing
Martin,

I thoroughly enjoy your sense of humor! :)

Yeah, my scan was NOT completed using an electron microscope! It was collected using the GeoSlam. I found where the precision got all out of wack; it was when I exported from CloudCompare to las format I didn't pay enough attention to the export details. It defaults to the highest precision. I appreciate your help in resolving my issues. I certainly learned a lot during this last test and look forward to learning more about the las format and the tools that are available. 

Best regards,

Benjamin Hippe
Reply all
Reply to author
Forward
0 new messages