Hello,
First a question. Why do you use a float for the range in the "extra bytes" ... ? You know that I have a very difficult relationship with the floating point.
[...]
data type: 9 (float), name "Range", description: "Range from Lidar to Point", scale: 1, offset: 0
[...]
attribute1 1.50853 26.5418 ('Range')
[...]
You really need to store the distances with a resolution as precice as a tenth of a micrometer for the ranges between one and two meters? I would assume centimeters or millimeters might already suffice, no? The LASzip compressor will spend a lot of time and disk space on compressing this useless precision that is most likely just "whatever happened to be in the lower order mantissa bits" in the ALU.
But on to the actual problem ...
It's the same technique as before. You want to move a huge distance. So let's break the move into two components. First a lasinfo report,
lasinfo -i GCP.laz
[....]
offset x y z: 420000 7070000 0
[....]
That tells me that the current offset is
420000, 7070000, 0 so to move x = 428158.557 and y = 7073962.429 to x = 0 and y = 0 we first set the current offset to zero.
lasinfo -i GCP.laz -set_offset 0 0 0 -repair_bb
Now we did the largest part of the translation in-place as you can see in the next lasinfo report.
What remains to translate in direction x is 428158.557 -
420000 = 8158.557.
What remains to translate in direction y is 7073962.429 -
7070000 = 3962.429.
So we do one final las2las call for this translation:
las2las -i GCP.laz -translate_x -8158.557 -translate_y -3962.429 -odix _zero -olaz
==================================
lasinfo (210128) report for 'GCP.laz'
reporting all LAS header entries:
file signature: 'LASF'
file source ID: 0
global_encoding: 1
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.1573'
file creation day/year: 76/2021
header size: 375
offset to point data: 1347
number var. length records: 3
point data format: 1
point data record length: 41
number of point records: 16882
number of points by return: 1889 0 0 0 0
scale factor x y z: 0.001 0.001 0.001
offset x y z: 420000 7070000 0
min x y z: 428158.055 7073961.979 -0.040
max x y z: 428158.984 7073962.943 1.256 start of waveform data packet record: 0
start of first extended variable length record: 693509
number of extended_variable length records: 0
extended number of point records: 16882
extended number of points by return: 1889 0 0 0 0 0 0 0 0 0 0 0 0 0 0
variable length header record 1 of 3:
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 3:
reserved 0
user ID 'LASF_Projection'
record ID 2112
length after header 0
description 'OGC WKT'
variable length header record 3 of 3:
reserved 0
user ID 'LASF_Projection'
record ID 34735
length after header 40
description 'by LAStools of rapidlasso GmbH'
GeoKeyDirectoryTag version 1.1.0 number of keys 4
key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
key 3072 tiff_tag_location 0 count 1 value_offset 28356 - ProjectedCSTypeGeoKey: GDA94 / MGA 56S
key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter
key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Meter
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 8158055 8158984
Y 3961979 3962943
Z -40 1256
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 13
point_source_ID 0 0
gps_time 1607514048.607132 1607514465.053890
attribute0 0 15 ('Ring')
attribute1 1.50853 26.5418 ('Range')
attribute2 0 0 ('elev')
attribute3 0 1.26 ('agl')
number of first returns: 16882
number of intermediate returns: 0
number of last returns: 16882
number of single returns: 16882
WARNING: there are 14993 points with return number 0
WARNING: there are 16882 points with a number of returns of given pulse of 0
histogram of classification of points:
2556 ground (2)
11790 low vegetation (3)
2536 medium vegetation (4)
============================================
lasinfo (210128) report for 'GCP.laz'
reporting all LAS header entries:
file signature: 'LASF'
file source ID: 0
global_encoding: 1
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.1573'
file creation day/year: 76/2021
header size: 375
offset to point data: 1347
number var. length records: 3
point data format: 1
point data record length: 41
number of point records: 16882
number of points by return: 1889 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: 8158.055 3961.979 -0.040
max x y z: 8158.984 3962.943 1.256
start of waveform data packet record: 0
start of first extended variable length record: 693509
number of extended_variable length records: 0
extended number of point records: 16882
extended number of points by return: 1889 0 0 0 0 0 0 0 0 0 0 0 0 0 0
variable length header record 1 of 3:
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 3:
reserved 0
user ID 'LASF_Projection'
record ID 2112
length after header 0
description 'OGC WKT'
variable length header record 3 of 3:
reserved 0
user ID 'LASF_Projection'
record ID 34735
length after header 40
description 'by LAStools of rapidlasso GmbH'
GeoKeyDirectoryTag version 1.1.0 number of keys 4
key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
key 3072 tiff_tag_location 0 count 1 value_offset 28356 - ProjectedCSTypeGeoKey: GDA94 / MGA 56S
key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter
key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Meter
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 8158055 8158984
Y 3961979 3962943
Z -40 1256
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 13
point_source_ID 0 0
gps_time 1607514048.607132 1607514465.053890
attribute0 0 15 ('Ring')
attribute1 1.50853 26.5418 ('Range')
attribute2 0 0 ('elev')
attribute3 0 1.26 ('agl')
number of first returns: 16882
number of intermediate returns: 0
number of last returns: 16882
number of single returns: 16882
WARNING: there are 14993 points with return number 0
WARNING: there are 16882 points with a number of returns of given pulse of 0
histogram of classification of points:
2556 ground (2)
11790 low vegetation (3)
2536 medium vegetation (4)
====================
lasinfo (210128) report for 'c:\GCP_zero.laz'
reporting all LAS header entries:
file signature: 'LASF'
file source ID: 0
global_encoding: 1
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 210315)'
file creation day/year: 76/2021
header size: 375
offset to point data: 1347
number var. length records: 3
point data format: 1
point data record length: 41
number of point records: 16882
number of points by return: 1889 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.502 -0.450 -0.040
max x y z: 0.427 0.514 1.256
start of waveform data packet record: 0
start of first extended variable length record: 693509
number of extended_variable length records: 0
extended number of point records: 16882
extended number of points by return: 1889 0 0 0 0 0 0 0 0 0 0 0 0 0 0
variable length header record 1 of 3:
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 3:
reserved 0
user ID 'LASF_Projection'
record ID 2112
length after header 0
description 'OGC WKT'
variable length header record 3 of 3:
reserved 0
user ID 'LASF_Projection'
record ID 34735
length after header 40
description 'by LAStools of rapidlasso GmbH'
GeoKeyDirectoryTag version 1.1.0 number of keys 4
key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
key 3072 tiff_tag_location 0 count 1 value_offset 28356 - ProjectedCSTypeGeoKey: GDA94 / MGA 56S
key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter
key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Meter
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 -502 427
Y -450 514
Z -40 1256
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 13
point_source_ID 0 0
gps_time 1607514048.607132 1607514465.053890
attribute0 0 15 ('Ring')
attribute1 1.50853 26.5418 ('Range')
attribute2 0 0 ('elev')
attribute3 0 1.26 ('agl')
number of first returns: 16882
number of intermediate returns: 0
number of last returns: 16882
number of single returns: 16882
WARNING: there are 14993 points with return number 0
WARNING: there are 16882 points with a number of returns of given pulse of 0
histogram of classification of points:
2556 ground (2)
11790 low vegetation (3)
2536 medium vegetation (4)