translate_xyz

1,109 views
Skip to first unread message

Susana Gonzalez

unread,
Nov 25, 2020, 6:02:31 AM11/25/20
to last...@googlegroups.com

Hi there,

 

I want to translate a point cloud from the local location to my actual location

 

This ground control point is in this location (x,y,z) -0.254923728814,-0.231194915254,-1.06457627119

 

 

And I need to move it to the actual location (757413.5099, 8448200.04, 121.151)

 

I am running this line but I am not sure what is going on with the y coordinate.

 

las2las -i I:\GCP\GCP.laz -translate_xyz 757413.5099 8448200.04 121.151 -o I:\GCP\GCP_xyz.laz

 

 

The file is here

https://interpine-my.sharepoint.com/:u:/g/personal/susana_gonzalez_interpine_nz/EX7s8juwMD9Iuuv6sW8g20IByUE1oFpD9F_pJSc1eldQZQ?e=CVCJuG

 

Thanks

Susana

 

Susana Gonzalez - Forest Engineer, LiDAR Science

 

Interpine Group Ltd

Mobile:      021 026 49733   DDI:  +64 7 350 3209 or Australia +61 2 906 47902 ext 722
Skype:        sugonar

Address:   99 Sala Street, PO Box 1209, Rotorua 3010, New Zealand
Website:  
www.interpine.co.nz

 

Interpine Innovation is Shaping Today’s Forests with the Technology of Tomorrow

He rangahau tenei ra he hangarau apopo

 

Martin Isenburg

unread,
Nov 29, 2020, 8:37:55 AM11/29/20
to LAStools - efficient command line tools for LIDAR processing
Hello Susanna,

 This ground control point is in this location (x,y,z) -0.254923728814,-0.231194915254,-1.06457627119


I would like to use these crazy precise coordinates to remind folks of coordinate resolution. The numbers above have 12 decimal digits, meaning there are 12 digits to the right of the decimal point. Here is what these digits mean:

3 digits = millimeter [mm] (a credit card has a thickness of around 1 mm)
6 digits = micrometer [μm] (a human hair varies in diameter from 17 μm to 181 μm)
9 digits = nanometer [nm] (a strand of human DNA is 2.5 nm in diameter)
12 digits = picometer [pm] (atoms are between 62 and 520 pm in diameter)

The picometre's length is of an order so small that its application is almost entirely confined to particle physics, quantum physics, chemistry and acoustics. And if you use 9, 12 or more digits to report a position obtained with any kind of measurement device used in surveying I will have to make fun of you ... it's coded into that strand of my human DNA which is 2.5 nm in diameter ... (-;

More fun with resolution:

https://rapidlasso.com/2019/05/06/how-many-decimal-digits-for-storing-longitude-latitude/
https://rapidlasso.com/2015/09/02/england-releases-national-lidar-dem-with-insane-vertical-resolution/

I also have an answer for your actual question. But first I need to take a stroll on the beach and lower some of that excessive resolution ... (-;

Martin

Susana Gonzalez

unread,
Nov 29, 2020, 4:05:19 PM11/29/20
to last...@googlegroups.com

Hahaha I was going to modify the resolution beforehand… but I thought you will love it 😃

 

From: last...@googlegroups.com <last...@googlegroups.com> On Behalf Of Martin Isenburg
Sent: Monday, 30 November 2020 2:30 AM
To: LAStools - efficient command line tools for LIDAR processing <last...@googlegroups.com>
Subject: Re: [LAStools] translate_xyz

 

[EXTERNAL]

--
Download LAStools at
http://lastools.org
http://rapidlasso.com
Be social with LAStools at
http://facebook.com/LAStools
http://twitter.com/LAStools
http://linkedin.com/groups/LAStools-4408378
Manage your settings at
http://groups.google.com/group/lastools/subscribe
---
You received this message because you are subscribed to the Google Groups "LAStools - efficient tools for LiDAR processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lastools+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lastools/CABSWR-H1ZNn0NxDch-By1zZV7ekZ%2BCRUzNujrbSAU7AY6i0p9g%40mail.gmail.com.

Martin Isenburg

unread,
Dec 3, 2020, 7:57:30 AM12/3/20
to LAStools - efficient command line tools for LIDAR processing
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)


--
Download LAStools at
http://lastools.org
http://rapidlasso.com
Be social with LAStools at
http://facebook.com/LAStools
http://twitter.com/LAStools
http://linkedin.com/groups/LAStools-4408378
Manage your settings at
http://groups.google.com/group/lastools/subscribe
---
You received this message because you are subscribed to the Google Groups "LAStools - efficient tools for LiDAR processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lastools+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages