Hello,
to move the ground control point
-0.255, -0.231, -1.065
to the actual position
757413.500, 8448200.040, 121.151
we use translation
757413.755 8448200.271 122.216
Huge translations are best done by modifying the offset in the header of the LAS file to avoid overflowing the 32 bit integers that store the coordinates. So first let's look at the current offset in the header of the GCP.laz file.
lasinfo -i GCP.laz
It's pretty insane and listed below.
offset x y z: -0.17660771150963 -0.629289240029698 -0.020436275908036
So first let's reoffset to remove some insanity:
las2las
-i GCP.laz -reoffset 0 0 0 -odix _sane -olaz
We do the translating in two steps:
(1) First we apply the big coordinate translations, those that are in the hundreds of thousands by simply merely changing the LAS header offset in place.
lasinfo -i GCP_sane.laz -set_offset 750000 8440000 0 -nc
(2) Second we do the smaller remaining translations
las2las
-i GCP_sane.laz -translate_xyz 7413.755 8200.271 122.216 -ocut 5 -odix _shifted -olaz
Here the result:
lasinfo -i GCP_shifted.laz
All the lasinfo reports are below.
Regards,
Martin
=============
lasinfo -i GCP.laz
WARNING: no payload for LASF_Projection VLR with record_id 2112.
lasinfo (201124) report for 'GCP.laz'
reporting all LAS header entries:
file signature: 'LASF'
file source ID: 0
global_encoding: 17
project ID GUID data 1-4: 00000000-0000-0000-0000-000000000000
version major.minor: 1.4
system identifier: 'LAStools (c) by rapidlasso GmbH'
generating software: 'QT Modeler 8.2.1512'
file creation day/year: 330/2020
header size: 375
offset to point data: 1253
number var. length records: 2
point data format: 1
point data record length: 41
number of point records: 5207
number of points by return: 77 0 0 0 0
scale factor x y z: 0.001 0.001 0.001
offset x y z: -0.17660771150963 -0.629289240029698 -0.020436275908036
min x y z: -0.746 -0.627 -0.000
max x y z: -0.033 0.123 0.646
start of waveform data packet record: 0
start of first extended variable length record: 53703
number of extended_variable length records: 1
extended number of point records: 5207
extended number of points by return: 77 0 0 0 0 0 0 0 0 0 0 0 0 0 0
variable length header record 1 of 2:
reserved 0
user ID 'LASF_Spec'
record ID 4
length after header 768
description 'by LAStools of rapidlasso GmbH'
Extra Byte Descriptions
data type: 2 (char), name "Ring", description: "Lidar Ring in Velodyne", scale: 1, offset: 0
data type: 9 (float), name "Range", description: "Range from Lidar to Point", scale: 1, offset: 0
data type: 6 (long), name "elev", description: "copied elevation", scale: 0.01, offset: 0 (not set)
data type: 6 (long), name "agl", description: "copied above ground level", scale: 0.01, offset: 0 (not set)
variable length header record 2 of 2:
reserved 0
user ID 'LASF_Projection'
record ID 2112
length after header 0
description 'OGC WKT'
extended variable length header record 1 of 1:
reserved 43707
user ID 'WKT'
record ID 2112
length after header 1
description ''
has spatial indexing LAX file
the header is followed by 2 user-defined bytes
LASzip compression (version 3.4r3 c2 50000): POINT10 2 GPSTIME11 2 BYTE 2
reporting minimum and maximum for all LAS point record entries ...
X -569 144
Y 2 752
Z 20 666
intensity 0 255
return_number 0 1
number_of_returns 0 0
edge_of_flight_line 0 0
scan_direction_flag 0 0
classification 2 4
scan_angle_rank 0 0
user_data 0 6
point_source_ID 0 0
gps_time 1603617704.880364 1603617983.128301
attribute0 0 15 ('Ring')
attribute1 1.50003 21.6977 ('Range')
attribute2 0 0 ('elev')
attribute3 0 0.65 ('agl')
number of first returns: 5207
number of intermediate returns: 0
number of last returns: 5207
number of single returns: 5207
WARNING: there are 5130 points with return number 0
WARNING: there are 5207 points with a number of returns of given pulse of 0
histogram of classification of points:
65 ground (2)
4601 low vegetation (3)
541 medium vegetation (4)
==============================
E:\software\LAStools\bin>lasinfo -i GCP_sane.laz
WARNING: no payload for LASF_Projection VLR with record_id 2112.
lasinfo (201124) report for 'GCP_sane.laz'
reporting all LAS header entries:
file signature: 'LASF'
file source ID: 0
global_encoding: 17
project ID GUID data 1-4: 00000000-0000-0000-0000-000000000000
version major.minor: 1.4
system identifier: 'LAStools (c) by rapidlasso GmbH'
generating software: 'las2las (version 201124)'
file creation day/year: 330/2020
header size: 375
offset to point data: 1253
number var. length records: 2
point data format: 1
point data record length: 41
number of point records: 5207
number of points by return: 77 0 0 0 0
scale factor x y z: 0.001 0.001 0.001
offset x y z: 0 0 0
min x y z: -0.746 -0.627 0.000
max x y z: -0.033 0.123 0.646
start of waveform data packet record: 0
start of first extended variable length record: 53703
number of extended_variable length records: 1
extended number of point records: 5207
extended number of points by return: 77 0 0 0 0 0 0 0 0 0 0 0 0 0 0
variable length header record 1 of 2:
reserved 0
user ID 'LASF_Spec'
record ID 4
length after header 768
description 'by LAStools of rapidlasso GmbH'
Extra Byte Descriptions
data type: 2 (char), name "Ring", description: "Lidar Ring in Velodyne", scale: 1, offset: 0
data type: 9 (float), name "Range", description: "Range from Lidar to Point", scale: 1, offset: 0
data type: 6 (long), name "elev", description: "copied elevation", scale: 0.01, offset: 0 (not set)
data type: 6 (long), name "agl", description: "copied above ground level", scale: 0.01, offset: 0 (not set)
variable length header record 2 of 2:
reserved 0
user ID 'LASF_Projection'
record ID 2112
length after header 0
description 'OGC WKT'
extended variable length header record 1 of 1:
reserved 43707
user ID 'WKT'
record ID 2112
length after header 1
description ''
the header is followed by 2 user-defined bytes
LASzip compression (version 3.4r3 c2 50000): POINT10 2 GPSTIME11 2 BYTE 2
reporting minimum and maximum for all LAS point record entries ...
X -746 -33
Y -627 123
Z 0 646
intensity 0 255
return_number 0 1
number_of_returns 0 0
edge_of_flight_line 0 0
scan_direction_flag 0 0
classification 2 4
scan_angle_rank 0 0
user_data 0 6
point_source_ID 0 0
gps_time 1603617704.880364 1603617983.128301
attribute0 0 15 ('Ring')
attribute1 1.50003 21.6977 ('Range')
attribute2 0 0 ('elev')
attribute3 0 0.65 ('agl')
number of first returns: 5207
number of intermediate returns: 0
number of last returns: 5207
number of single returns: 5207
WARNING: there are 5130 points with return number 0
WARNING: there are 5207 points with a number of returns of given pulse of 0
histogram of classification of points:
65 ground (2)
4601 low vegetation (3)
541 medium vegetation (4)
==============================
E:\software\LAStools\bin>lasinfo -i GCP_sane.laz -set_offset 750000 8440000 0 -nc
WARNING: no payload for LASF_Projection VLR with record_id 2112.
lasinfo (201124) report for 'GCP_sane.laz'
reporting all LAS header entries:
file signature: 'LASF'
file source ID: 0
global_encoding: 17
project ID GUID data 1-4: 00000000-0000-0000-0000-000000000000
version major.minor: 1.4
system identifier: 'LAStools (c) by rapidlasso GmbH'
generating software: 'las2las (version 201124)'
file creation day/year: 330/2020
header size: 375
offset to point data: 1253
number var. length records: 2
point data format: 1
point data record length: 41
number of point records: 5207
number of points by return: 77 0 0 0 0
scale factor x y z: 0.001 0.001 0.001
offset x y z: 750000 8440000 0
min x y z: -0.746 -0.627 0.000
max x y z: -0.033 0.123 0.646
start of waveform data packet record: 0
start of first extended variable length record: 53703
number of extended_variable length records: 1
extended number of point records: 5207
extended number of points by return: 77 0 0 0 0 0 0 0 0 0 0 0 0 0 0
variable length header record 1 of 2:
reserved 0
user ID 'LASF_Spec'
record ID 4
length after header 768
description 'by LAStools of rapidlasso GmbH'
Extra Byte Descriptions
data type: 2 (char), name "Ring", description: "Lidar Ring in Velodyne", scale: 1, offset: 0
data type: 9 (float), name "Range", description: "Range from Lidar to Point", scale: 1, offset: 0
data type: 6 (long), name "elev", description: "copied elevation", scale: 0.01, offset: 0 (not set)
data type: 6 (long), name "agl", description: "copied above ground level", scale: 0.01, offset: 0 (not set)
variable length header record 2 of 2:
reserved 0
user ID 'LASF_Projection'
record ID 2112
length after header 0
description 'OGC WKT'
extended variable length header record 1 of 1:
reserved 43707
user ID 'WKT'
record ID 2112
length after header 1
description ''
the header is followed by 2 user-defined bytes
LASzip compression (version 3.4r3 c2 50000): POINT10 2 GPSTIME11 2 BYTE 2
==============================
E:\software\LAStools\bin>lasinfo -i GCP_shifted.laz
WARNING: no payload for LASF_Projection VLR with record_id 2112.
lasinfo (201124) report for 'GCP_shifted.laz'
reporting all LAS header entries:
file signature: 'LASF'
file source ID: 0
global_encoding: 17
project ID GUID data 1-4: 00000000-0000-0000-0000-000000000000
version major.minor: 1.4
system identifier: 'LAStools (c) by rapidlasso GmbH'
generating software: 'las2las (version 201124)'
file creation day/year: 330/2020
header size: 375
offset to point data: 1253
number var. length records: 2
point data format: 1
point data record length: 41
number of point records: 5207
number of points by return: 77 0 0 0 0
scale factor x y z: 0.001 0.001 0.001
offset x y z: 750000 8440000 0
min x y z: 757413.009 8448199.644 122.216
max x y z: 757413.722 8448200.394 122.862
start of waveform data packet record: 0
start of first extended variable length record: 53707
number of extended_variable length records: 1
extended number of point records: 5207
extended number of points by return: 77 0 0 0 0 0 0 0 0 0 0 0 0 0 0
variable length header record 1 of 2:
reserved 0
user ID 'LASF_Spec'
record ID 4
length after header 768
description 'by LAStools of rapidlasso GmbH'
Extra Byte Descriptions
data type: 2 (char), name "Ring", description: "Lidar Ring in Velodyne", scale: 1, offset: 0
data type: 9 (float), name "Range", description: "Range from Lidar to Point", scale: 1, offset: 0
data type: 6 (long), name "elev", description: "copied elevation", scale: 0.01, offset: 0 (not set)
data type: 6 (long), name "agl", description: "copied above ground level", scale: 0.01, offset: 0 (not set)
variable length header record 2 of 2:
reserved 0
user ID 'LASF_Projection'
record ID 2112
length after header 0
description 'OGC WKT'
extended variable length header record 1 of 1:
reserved 43707
user ID 'WKT'
record ID 2112
length after header 1
description ''
the header is followed by 2 user-defined bytes
LASzip compression (version 3.4r3 c2 50000): POINT10 2 GPSTIME11 2 BYTE 2
reporting minimum and maximum for all LAS point record entries ...
X 7413009 7413722
Y 8199644 8200394
Z 122216 122862
intensity 0 255
return_number 0 1
number_of_returns 0 0
edge_of_flight_line 0 0
scan_direction_flag 0 0
classification 2 4
scan_angle_rank 0 0
user_data 0 6
point_source_ID 0 0
gps_time 1603617704.880364 1603617983.128301
attribute0 0 15 ('Ring')
attribute1 1.50003 21.6977 ('Range')
attribute2 0 0 ('elev')
attribute3 0 0.65 ('agl')
number of first returns: 5207
number of intermediate returns: 0
number of last returns: 5207
number of single returns: 5207
WARNING: there are 5130 points with return number 0
WARNING: there are 5207 points with a number of returns of given pulse of 0
histogram of classification of points:
65 ground (2)
4601 low vegetation (3)
541 medium vegetation (4)