las2dem_new

15 views
Skip to first unread message

Michael Perdue

unread,
Jul 29, 2026, 2:03:26 AM (4 days ago) Jul 29
to LAStools - efficient command line tools for LIDAR processing
Hello,

I recently started playing with the las2dem_new program and comparing its performance to the original program. The new version is just.... wow. I mean (Insert language that would require Silke to sensor me)...

>/usr/bin/time -v las2dem_new -spike_free -grid 0.25 -i foobar.copc.laz -o foobar.asc -float_precision 0.001
setting (unspecified) spike-free freeze to 0.75 horizontal units (three times the step size)
WARNING: using brute_locate
WARNING: there were 15296 duplicate rasters
Command being timed: "las2dem_new -spike_free -grid 0.25 -i foobar.copc.laz -o foobar.asc -float_precision 0.001"
User time (seconds): 42.53
System time (seconds): 5.70
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:48.50
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 228852
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 63220
Voluntary context switches: 25
Involuntary context switches: 1089
Swaps: 0
File system inputs: 0
File system outputs: 635048
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

>/usr/bin/time -v las2dem -spike_free -grid 0.25 -i foobar.copc.laz -o foobar.asc -float_precision 0.001
setting (unspecified) spike-free freeze to 0.75 horizontal units (three times the step size)
WARNING: there were 15371 duplicate rasters
Command being timed: "las2dem -spike_free -grid 0.25 -i foobar.copc.laz -o foobar.asc -float_precision 0.001"
User time (seconds): 341.73
System time (seconds): 2.99
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 5:44.98
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1720332
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 428338
Voluntary context switches: 11
Involuntary context switches: 5943
Swaps: 0
File system inputs: 0
File system outputs: 78136
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0


Seven times less memory consumption and seven times faster! I thought the original tool was already quite perfromant, but the new program raises the bar in a very large way. I'm impressed. Well done.

The only thing I wanted to ask about is the float_precision switch doesn't seem to be working quite right. It seems to be right if I set it to 1 or 0.01, but not if I set it to 0.1 or 0.001. When set to 0.001, every number carries 4 decimal place and ends with a 1, while when set to 0.1, it caries three extra decimal places. Is this expected?

>head foobar_0001.asc
ncols 2000
nrows 2000
xllcorner 560000.000000
yllcorner 5341000.000000
cellsize 0.250000
NODATA_value -9999.0
1501.7151 1501.8551 1501.9341 1501.9941 1502.2171 1502.3791 1502.4921 1502.6111 1502.5491 1502.5101 1502.6211 1502.6711 1502.9451 1507.9671 1507.0261 1504.5081 1503.1161 1503.0371 1503.1401 1503.2431 1503.4731 1503.6091 1503.6831 1503.6201 1503.6421 1503.5751 1518.1871 1517.5411 1517.9691 1518.7941

>head foobar_0100.asc
ncols 2000
nrows 2000
xllcorner 560000.000000
yllcorner 5341000.000000
cellsize 0.250000
NODATA_value -9999.0
1501.7000 1501.9000 1501.9000 1502.0000 1502.2000 1502.4000 1502.5000 1502.6000 1502.5000 1502.5000 1502.6000 1502.7000 1502.9000 1508.0000 1507.0000 1504.5000 1503.1000 1503.0000 1503.1000 1503.2000 1503.5000 1503.6000 1503.7000 1503.6000 1503.6000 1503.6000 1518.2000 1517.5000 1518.0000 1518.8000 1520.2000 1524.2000 1524.3000 1524.1000 1524.3000 1524.4000 1524.3000 1525.4000 1525.6000 1525.7000 1525.5000 1525.6000 1525.1000 1524.8000 1524.8000 1524.3000 1523.9000 1516.2000 1512.1000 1515.3000 1520.5000 1520.7000 1520.8000 1521.1000 1521.0000 1520.9000 1520.8000 1520.8000 1520.7000 1520.7000 1520.7000 1520.7000 1520.6000 1520.6000 1520.6000 1520.5000 1520.3000 1514.4000 1507.6000 1507.5000 1507.5000 1507.6000 1507.8000 1509.2000 1513.4000 1515.5000 1516.6000 1516.8000 1516.8000 1516.1000 1515.1000 1514.8000

Cheers,

Mike
Reply all
Reply to author
Forward
0 new messages