LASzip lossless compression of LiDAR Martin Isenburg http://lastools.org http://laszip.org
LASzip
lossless compression of LiDAR
Martin Isenburg
http://lastools.org
http://laszip.org
Overview
• Preliminaries
• Compression
• The LASzip compressor
• Performance Results
• Live Demo
• Discussion
Simple LiDAR format: ASCII # x y z intensity
#
#
632441.315916 5241371.511566 297.164155 134
632441.489538 5241371.138985 297.384893 232
632440.711040 5241371.641106 297.404111 65
632438.872603 5241371.507230 298.037727 211
632439.354545 5241371.245455 300.450547 34
632439.619802 5241371.101926 302.021196 55
632440.637407 5241370.403773 301.072372 76
632441.223543 5241370.042336 301.439231 92
632441.285229 5241369.728593 301.298858 172
632440.519973 5241370.171933 301.733190 147
632439.612858 5241370.851281 302.580127 125
632439.340006 5241370.904065 300.062403 190
632438.620724 5241371.322045 299.246201 202
632438.260363 5241371.566035 298.630602 182
632436.544357 5241371.554476 302.572440 293
632437.604495 5241370.690458 300.955040 71
632438.223774 5241370.272349 301.742230 90
632438.920859 5241369.552097 297.597205 49
632438.829124 5241369.922948 302.242295 95
632439.382447 5241369.648279 303.473824 152
632440.346959 5241368.654692 298.592465 108
632439.672510 5241369.617202 305.104726 219
632440.379697 5241369.197974 305.976798 83
...
LiDAR points
LiDAR “explodes”
• airborne and mobile
platforms scan with
increasing detail
• impractical to store
points as gigantic ASCII text files
– inefficient to parse, seek, write, …
• ASPRS creates LAS(er) format
– binary LiDAR exchange standard
The LAS & LAZ format
http://lasformat.org
http://laszip.org
LAStools
• started in January 2007 – API to read/write LAS
– lasinfo
– lasview
– las2txt
– txt2las
– laszip
• online since April 2007
• NEW: ArcGIS toolbox for LiDAR
http://lastools.org
Working with LAStools
run
Some Statistics
• LAStools user group: 830 members http://groups.google.com/group/lastools
• follow LAStools on facebook http://facebook.com/lastools
• follow LAStools on twitter http://twitter.com/lastools
• downloads
– in 2012: 2,991 (unique IPs)
– lifetime: 11,845 (unique IPs)
Dual Licensing
• open source part
– LASlib (with LASzip)
– core tools: las2las, las2txt, laszip, ...
– “free” (LGPL license)
• closed source part
– not “free”, except for academic or
educational use (with point limits)
– full versions can be licensed
Overview
• Preliminaries
• Compression
• The LASzip compressor
• Performance Results
• Live Demo
• Discussion
Compressing ...
• real stuff
– sleeping bags
– oxygen
• LiDAR points
– WinZIP, WinRAR, 7zip
– LizardTech® LiDAR
Compressor™ ($2995.00)
– LASzip ($0.00)
Predictive Compression
coordinate = 343,233
prediction = 343,214
corrector = coordinate - prediction
= 343,233 - 343,214
= 19 0
10
20
30
40
50
60
70
coordinate distribution
0
500
1000
1500
2000
2500
3000
3500
corrector distribution
x-axis 343,233 343,214
prediction
corrector
Entropy Coding
for a symbol sequence of t types
# of type t pi =
i = 1
t
Entropy = pi • log2( ) bits pi
1
# total
2.0 bits 1.3 bits 0.2 bits
Overview
• Preliminaries
• Compression
• The LASzip compressor
• Performance Results
• Live Demo
• Discussion
LASzip fusa.laz R07205352.laz MARS_Sample.las autzen.las lincoln.las
• write header (uncompressed)
• write points in “chunks” of 50,000
– store first point raw (uncompressed)
– compress next point
• predict attributes that have changed
– return number, intensity, scan angle, …
• predict coordinates using Δx, Δy, z
• treat GPS time as integer, predict steps
search for “LASzip” on
http://youtube.com
Spatial Queries & “chunking”
spatial demo
Overview
• Preliminaries
• Compression
• The LASzip compressor
• Performance Results
• Live Demo
• Discussion
Smorgasbord of 27 files
LAZ
388
MB
15.6
%
LAS
2,479
MB
SID
610
MB
24.6
%
RAR
551
MB
22.2
%
ZIP
1,210
MB
48.8
%
DNR Minnesota LiDAR
ftp://lidar.dnr.state.mn.us
LASzip vs. LizardTech® (1)
LAS
1,534
MB
LAZ SID
138 MB
9.0
% 388
MB
25.3
%
LAZ SID
3.3 times
slower
decode
LAZ SID
20.6 times
slower
encode
LASzip vs. LizardTech® (2)
LAS
2,454
MB
LAZ SID
407
MB
16
.6 %
716
MB
29.2
%
LAZ SID
4.6 times
slower
decode
LAZ SID
16.4 times
slower
encode
Overview
• Preliminaries
• Compression
• The LASzip compressor
• Performance Results
• Live Demo
• Discussion
Demo: laszip.exe
run
Overview
• Preliminaries
• Compression
• The LASzip compressor
• Performance Results
• Live Demo
• Discussion
• fastest encoding / decoding
• highest compression
• tested across TB of data
• integrates with LAX spatial indexing
• open source
• LGPL-licensed
LASzip
• LAZ = lossless compressed LAS
http://laszip.org
FREE !!!
Downloading LAZ
• Open
Topography
• Minnesota
DNR
• NOAA
• USGS
• Dielmo
• …
Software support for LAZ
• TopoDot (Certainty 3D)
• FME 2012 (Safe Software)
• Global Mapper (BlueMarbleGeo)
• RiProcess (Riegl)
• LAStools
• Voyager 1.3.1 (Voyager GIS)
• ...
Future Work
• faster encoding/decoding
– embarassingly parallel
– one “chunk” per thread
• LAS 1.4
– correlate points along same pulse
– better “extra bytes” support
• integrate full waveform
Acknowledgements
• users of LAStools for bug reports
• Howard Butler for “chunking”
• Tim Loesch of DNR Minnesota for
first large-scale LAZ campaign
• Dave Finnegan of USACE for
financial support
• Michael P. Gerlek and Howard
Butler for libLAS integration help
Thank You.
http://lastools.org
http://laszip.org
DNR Minnesota LiDAR (1)
ftp://lidar.dnr.state.mn.us
Detailed Results