Re: [LAStools] External waveform files (WDP)

Skip to first unread message

Martin Isenburg

Jul 14, 2018, 5:55:22 AM7/14/18
to LAStools - efficient command line tools for LIDAR processing, PulseWaves - no pulse left behind

it's a well-known known fact that I am not a big fan of the LAS 1.3/1.4 extension for the storage of digitized waveforms. I think it's fair to say that I have a personal dislike towards point types 4, 5, 9, and 10 so that generating LAS / LAZ files containing them is not really something I find worthwhile to support. (-:

​That said, it's part of the LAS specification so I cannot really be that harsh to these unwanted point types. (-:

The best example code to follow is probably that from laszip.cpp that can also compress / decompress the waveforms to an external WDP file when option '-waveforms' is chosen in the command line. It would be good to follow the compression / decompression in the debugger by using an existing sample LAS 1.3/1.4 FWF file, compress it, and see how the LASwriter is given the VLRs that contain the wavepacket descriptors that need to be stored in the variable length section of the LAS header and follow how the LASwriter and the LASwaveform13writer are fed the actual waveform samples 

I'm CC-ing the PulseWaves forum because you should really write the PulseWaves format ... (-;


Martin Isenburg

Jan 14, 2019, 11:03:42 PM1/14/19
to LAStools - efficient command line tools for LIDAR processing, PulseWaves - no pulse left behind
Hello Eric,

as people on this list will attest ... I am really not a big fan of LAS FWF. Have you considered exporting your data to the PulseWaves format instead? Is your system recording the shape of the outgoing pulse as well?

How to "understand" the LAS FWF extension (that I dislike) is summarized here by Evon with two pretty graphics that I had made a long time ago when the third of the three big vendors (Leica RIEGL, Optech) for the fourth time release a buggy LAS FWF exporter ... (-:

Here you can read up on many discussions with issues in the LAS FWF files:



On Tue, Jan 15, 2019 at 2:09 AM Eric Rehm <> wrote:
On Saturday, 14 July 2018 05:55:32 UTC-4, Martin Isenburg wrote:

The best example code to follow is probably that from laszip.cpp  ... 

Hi Martin,

I'm new to LAStools.  I'm helping develop a FWF underwater LiDAR.  I support Open Data.   As well, I want to make sure we could take advantage of existing LAS FWF tools like TerraSolid's TerraSurface that provide FWF data display out-of-the box.   

To get my feet wet, I thought I would try to extend the example las_example_write_only_with_extra_bytes.cpp to write a LAS file with some fake FWF data to an external WDP file, e.g., 1 waveform packet descriptor, perhaps 2 or 3 returns per pulse with synthetic return point locations, e.g., creating a file that reproduces the ASPRSorg Wiki description here using synthetic waveform data (with multiple returns / pulse in a single WDP to keep it simple).  (Since we're underwater, no refracted pulses.)

However, I can't really find any example code (including laszip.cpp) that starts from scratch, e.g., defining a waveform packet descriptor (e.g., LASvlr_wave_packet_descr.setTemporalSpacing(), etc.), linking a LASpoint to a descriptor  (e.g., LASwavepacket.setIndex()), properly calculating the offset for more than one point (given a fixed waveform packet size for each point), writing the FWF data, etc.

Have you coded such an example that you can share?

Thanks for anything additional you can provide to help me get started here.


/eric rehm
Université Laval / Takuvik

Download LAStools at
Be social with LAStools at
Manage your settings at

Martin Isenburg

Jan 19, 2019, 11:00:32 PM1/19/19
to LAStools - efficient command line tools for LIDAR processing, PulseWaves - no pulse left behind

after working with Eric Rehm and Jan Depner through a few email exchanges we now have some simple demo code for writing correct LAS FWF from scratch using LASlib. Important to know is that the only wave packet descriptor 1 through 255 are valid. The waveform descriptor 0 is reserved for returns *without* waveform.  The (maximally 255 different) wave packet descriptors are stored with the VLR user_id "LASF_Spec" and a VLR record_id that falls into this range: record_id >= 100  && record_id < 355 and the corresponding index is computed as idx = record_id - 99. See this code part for comparison:

The new sample write code for three returns referencing a single waveform can be found here:

Thanks to Eric and Jan for motivating and working with me through all the issues and help to fix some inconsistencies.


Martin @rapidlasso

Reply all
Reply to author
0 new messages