convert Txt to LAZ (with txt2las)

417 views
Skip to first unread message

ab.mor...@gmail.com

unread,
Jul 25, 2016, 2:35:10 PM7/25/16
to LAStools - efficient tools for LiDAR processing
Hello,

I have a problem with txt2las result.

when I convert my points file (ascii, *.txt, with 4 column: xyzi), min and max values of x, y, z are reported that I have marked in green and red below:

reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  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:        'txt2las (version 160721)'
  file creation day/year:     207/2016
  header size:                227
  offset to point data:       227
  number var. length records: 0
  point data format:          0
  point data record length:   20
  number of point records:    10087141
  number of points by return: 10087141 0 0 0 0
  scale factor x y z:         0.0001 0.0001 0.0001
  offset x y z:               31515000 5686000 0
  min x y z:                  31515000.0000 5686500.0000 42.9000
  max x y z:                  31515335.8400 5686999.9900 80.8400
LASzip compression (version 2.4r2 c2 50000): POINT10 2
reporting minimum and maximum for all LAS point record entries ...
  X                   0    3358400
  Y             5000000    9999900
  Z              429000     808400
  intensity           1       5100
  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
WARNING: there is coordinate resolution fluff (x10) in XYZ
WARNING: there is serious coordinate resolution fluff (x100) in XYZ
number of first returns:        10087141
number of intermediate returns: 0
number of last returns:         10087141
number of single returns:       10087141
overview over number of returns of given pulse: 10087141 0 0 0 0 0 0
histogram of classification of points:
        10087141  never classified (0)


 I know that green lines are correct, but I don't know what the red lines express exactly.

thank you.

Martin Isenburg

unread,
Jul 25, 2016, 2:45:54 PM7/25/16
to LAStools - efficient command line tools for LIDAR processing
Hello Ab,

there is no problem. Internally the LAS format stores the x, y, and z coordinates as integers X, Y, and Z. Their minimum and maximum values are shown in red in your lasinfo report. In order to get from these integer coordinate X, Y, and Z to the actual coordinates x, y, and z we use the scale_factors and the offsets from the header (the two lines above the green bouding box). These are the formulas to get from the internal (X,Y,Z) representation in the LAS file back to the (x,y,z) coordinates in the real world:

x = 0.0001 * X + 31515000 
y = 0.0001 * Y + 5686000 
z = 0.0001 * Z + 0

Now you chose an unnecessary precise scale factor of 0.0001 for all three coordinates. These two lines here in your lasinfo report

WARNING: there is coordinate resolution fluff (x10) in XYZ
WARNING: there is serious coordinate resolution fluff (x100) in XYZ

tell me that this your scale factors are too precise by a factor of 100. I think that your ASCII values only have centimeter resolution - meaning two digits after the decimal point. Hence you should be using the more common scale factor of 0.01 0.01 0.01 that txt2las is using by default. Pretty much all airborne LiDAR is stored with centimeter resolution (aka scalefactors of 0.01).


Regards,

Martin @rapidlasso

ab.mor...@gmail.com

unread,
Jul 26, 2016, 3:43:01 AM7/26/16
to LAStools - efficient tools for LiDAR processing
Thanks for your attention.

yes, my ASCII values have centimeter resolution and scale factors of 0.01 0.01 0.01 are better choice.

thanks.
Reply all
Reply to author
Forward
0 new messages