Hello,
this discussion is in respect to revision 13 of the LAS 1.4
specification but equally applies to the corresponding parts of the
latest LAS 1.3 specification. The relevant pages are page 14/15 and
page 26/27:
http://www.asprs.org/a/society/committees/standards/LAS_1_4_r13.pdf
First RIEGL (late 2011) and then Optech (now) were miss-reading the
FWF part of the LAS specification and have been implementing export
software producing files that were incompatible to those produced by
Leica. In both cases the engineers complained to me - as we were
fixing up the exporters - that the language of the LAS specification
is too vague and subject to interpretation. In fact even what I assume
to be the "ground truth" - namely the Leica exports - are quite
different from what the specification describes.
Why do I consider Leica's output as the "ground-truth"?
(1) I read up on the history of FWF in LAS 1.3. That part of the
specification was proposed (and I assume mostly written) by Paul Galla
of Leica.
(2) It seems that the Leica LAS 1.3 FWF is the only output that is
currently being used in a third vendor's commercial software
(Terrasolid) for actual processing (extracting additional returns).
There are two issues to clarify before we can start improving:
(1) Where is the number of samples per waveform encoded?
(a) in the "Number of Samples" field of the Wave Packet Descriptor
VLRs (of which there are only 255)? This is what Leica stores in this
field, and this was what I read into the wording of the specification.
I quote page 27:
"Number of Samples: The number of samples associated with this
waveform packet type. This value always represents the fully
decompressed waveform packet."
But Leica outputs 256 samples (no matter what) whereas Optech outputs
a great variety of different lengths.
(b) implicitely in the "size" field of the "Wave Packet" in each point
record? This is what Optech does. It is implicit because the stored
number has to be divided by two to get the actual number of (16 bit)
sampled. But this "implicit" computation is a little dangerous because
if the actual samples were stored in some compressed manner then the
size field would no longer be able to fulfill this dual role.
So does Optech now have to (1) store a huge number of Wave Packet
Descriptors each with a different "Number of Samples" field as you can
see in the example histogram of the "size" field below or (2) pad the
waveforms with "zero" values to lower the number of VLRs required?
lasinfo.exe -i optech.laz -histo wavepacket_size 1 -nh -nv -nmm
bin 96 has 58591
bin 104 has 113479
bin 112 has 206085
bin 120 has 607946
bin 128 has 2653437
bin 136 has 2249816
bin 144 has 1193661
bin 152 has 1026636
bin 160 has 899445
bin 168 has 809480
bin 176 has 751317
bin 184 has 711539
bin 192 has 668146
bin 200 has 606943
bin 208 has 540692
bin 216 has 494023
bin 224 has 456205
bin 232 has 409471
bin 240 has 365311
bin 248 has 312900
bin 256 has 258146
bin 264 has 210543
bin 272 has 174621
bin 280 has 144973
bin 288 has 115251
bin 296 has 91945
bin 304 has 73190
bin 312 has 55318
bin 320 has 41798
bin 328 has 31443
bin 336 has 22544
bin 344 has 16012
bin 352 has 11124
bin 360 has 7527
bin 368 has 5220
bin 376 has 3332
bin 384 has 2041
bin 392 has 1342
bin 400 has 973
bin 408 has 562
bin 416 has 410
bin 424 has 184
bin 432 has 191
bin 440 has 119
bin 448 has 39
bin 456 has 35
bin 464 has 25
bin 472 has 15
bin 480 has 15
bin 488 has 10
bin 496 has 5
I seem to remember that also RIEGL was doing it also this way but
their variety was much lower (160, 240, 320, 400, 480). And they are
now exporting PulseWaves which is one way to side-step the issue.
Roland? Guenther? Can you confirm?
(2) What is scaling and direction of the vector stored in the X(t),
Y(t), Z(t) fields of the "Wave Packet" in each point record?
The wording of the specification is really confusing here, but this is
what Leica and RIEGL (and soon also Optech) are storing in the X(t),
Y(t), Z(t) fields.
X(t), Y(t), Z(t) contain a vector that describes the direction of the
laser beam (away from the optical origin of the laser) and the
round-trip (!) distance that the light of the laser travels per
picosecond in meters. Hence, the length of this vector should be
somewhere around 0.299792458 / 1000 / 2 = 0.00014989623. So that the
"location" of each waveform sample for "S" ranging from 0 to
num_samples-1 can be computed as
dist = location - s*temporal;
X_sample = X_return + dist*X(t);
Y_sample = Y_return + dist*Y(t);
Z_sample = Z_return + dist*Z(t);
where "location" is the "Return Point location" field from the Wave
Packet of each point record that stores - i quote the specification
(page 14) - an "offset in picoseconds from the first digitized value
to the location within the waveform packet that the associated return
pulse was detected." and "temporal" is the "Temporal Sample Spacing"
that stores - i quote the specification (page 27) the "temporal sample
spacing in picoseconds. Example values might be 500, 1000, 2000 and so
on, representing digitizer frequencies of 2 GHz, 1 GHz and 500 MHz
respectively."
Hopefully one day get all three big hardware vendors output mutually
compatible LAS 1.3 FWF files ... but issue (1) really needs to be
resolved first. For issue (2) we only need a better wording in the
spec. Seems by nagging has resolved that now. (-: Is anyone aware on
any other software (besides RiPROCESS, LMS, and ALSXX) that generates
LAS 1.3 FWF?
Comments?
Martin @rapidlasso
--
http://rapidlasso.com - fast tools to fix LiDAR specs