las2las

518 views
Skip to first unread message

Karin...@ldbv.bayern.de

unread,
Apr 9, 2018, 7:55:46 AM4/9/18
to last...@googlegroups.com

Hello,

 

there is a strange behaviour with las2las.

 

las2las -i *.laz -keep_class 24 -odix _only24 -olaz -cores 4

 

If there are no points with class 24 in the file, las2las processes empty files.

 

I am not sure if I had this  problem in former LAStools versions. My current version is of date 22-03-2018.

 

Regards

 

Karin

807_5407_only24.laz

Martin Isenburg

unread,
Apr 9, 2018, 8:27:18 AM4/9/18
to LAStools - efficient command line tools for LIDAR processing
Hello Karin,

what behavior were you expecting? When you remove all points from a file using the standard LASlib filter "-keep_class xxx" then the result will be a file containing zero points. This has always been like that (at least for las2las). Would you want this empty LAS file to then be discarded? As las2las operated in a streaming manner (e.g. the LAS header of the output is written before the first point of the input is read) that would require an explicit "remove file" system call at the end of processing for all files here no points survived the filter.

One more thing. You LAS file seems to be stored with mm resolution (scale factors are 0.001 0.001 0.001 in the lasinfo report). For airborne LiDAR this is an overkill as cm resolution (scale factors are 0.01 0.01 0.01) would be sufficient. Your LAZ files will be much smaller and compression and decompression will be faster if you remove this millimeter digit that is unlikely to contain any actual information (but scanner noise). This could save the state of Bavaria so much money ... (-;

Also ... it seems all files carry around a VLR in the LAS header called "LBDV - Streifen" (which is "flightline" in German) with a payload of around 10000 bytes. The file name and bounding box suggest that this is a tile. Does this VLR in the LAS header carry information about all the "Streifen" that contributed to this tile or is this maybe a "left-over" from the original "Streifen". If you used lastile to tile the original set of many "Streifen" then all tiles would be given the VLR from the LAS header of the very first "Streifen" in the list.

Regards,

Martin @rapidlasso

e:\LAStools\bin>lasinfo 807_5407_only24.laz
lasinfo (180408) report for '807_5407_only24.laz'
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             1
  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 180322)'
  file creation day/year:     85/2015
  header size:                227
  offset to point data:       10287
  number var. length records: 1
  point data format:          1
  point data record length:   28
  number of point records:    0
  number of points by return: 0 0 0 0 0
  scale factor x y z:         0.001 0.001 0.001
  offset x y z:               800000 5264000 0
  min x y z:                  800000.000 5264000.000 0.000
  max x y z:                  800000.000 5264000.000 0.000
variable length header record 1 of 1:
  reserved             0
  user ID              'LBDV - Streifen'
  record ID            32766
  length after header  10004
  description          'LDBV - Losstreifendaten'
the header is followed by 2 user-defined bytes
LASzip compression (version 3.2r0 c2 50000): POINT10 2 GPSTIME11 2
LAStiling (idx 1, lvl 1, sub 0, bbox 806000 5.407e+006 808000 5.409e+006)
reporting minimum and maximum for all LAS point record entries ...
  X                   0          0
  Y                   0          0
  Z                   0          0
  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 0.000000 0.000000
number of first returns:        0
number of intermediate returns: 0
number of last returns:         0
number of single returns:       0

Karin...@ldbv.bayern.de

unread,
Apr 9, 2018, 8:47:49 AM4/9/18
to last...@googlegroups.com

Hello Martin,

 

the behaviour I expected was that the files that contain no points are to be discarded.

Some time ago you implemented that in lasclip I think. There the result files containing no points are discarded.

 

Our LDBV-Streifen is a result of changing the file format from ASCII (separate last and first echo data) to laz.

The Streifen –Info is encoded, we can rebuild it with an inhouse tool.

Since we switched to laz  we get proper flightline numbers from the contractors, so we don't need the LDBV-Streifen for the new data.

 

 

Regards

 

Karin

Martin Isenburg

unread,
Apr 9, 2018, 9:34:15 AM4/9/18
to LAStools - efficient command line tools for LIDAR processing
Hello,

okay then. In the next release of LAStools the four tools (with the ability to remove points) las2las, lasclip, lasheight, and lasnoise will remove empty files unless they are explicitely asked to '-dont_remove_empty_files' by this new command line switch.

Regards from Costa Rica,

Martin @rapidlasso

Manesha De Silva

unread,
Jul 30, 2020, 9:41:43 PM7/30/20
to LAStools - efficient tools for LiDAR processing
HI Martin

I actually needed the file with 0 points to be created for my workflow to work.  '-dont_remove_empty_files' command line switch came real handy.  Thanks!

Regards
Manesha
Reply all
Reply to author
Forward
0 new messages