splitting large LAS files

1,924 views
Skip to first unread message

Martin Isenburg

unread,
Sep 7, 2013, 4:18:59 AM9/7/13
to last...@googlegroups.com
Hello,

there was a question in the "laser scanning forum" on how to split a 5.6 GB LAS file. The question was: "I have received a large .LAS file (5.6Gb) and i need to split the file so that i can import the smaller files into Microstation V8. Currently when i try to import the 5.6Gb file it says that there is not enough memory. Any help would be appreciated." 

The poor lad was led astray with answers like "[...]it sounds like you need more memory :) How much do you currently have? [...] I would steal some ram from another computer in the meantime then get some more ram on order. It could be another issue like software, but unless you already have 24gb of memory or more you probably will eventually end up buying more anyway." and "Windows 7 needs at a minimum 1.5 times your physical memory in free unused hard drive space to use a virtual memory in case you run out of physical memory. I have seen this cause problems sometimes when I let my operating system hard drive get too full and I while maxing out my RAM in SCENE."

To split a LAS file there is absolutely no need to load the entire file into memory at once. All of the possible options in LAStools perform point file splitting in a streaming manner that in all typical cases will require less than 20 MB of main memory. The best tool to do a sequential strip would be lassplit.exe (http://lastools.org/download/lassplit_README.txt) but this requires licensing. Your best "free" option is the (somewhat unintuitively named) lasmerge.exe (http://lastools.org/download/lasmerge_README.txt) where you can do the splitting with this command, which splits the file every 500,000,000 points:

lasmerge -i huge.las -o split0000.las -split 500000000
lasmerge -i huge.las -o split0000.laz -split 500000000

The first command produces the LAS files "split0000.las", "split0001.las", "split0002.las", "split0003.las", ... and the second command produces the compressed LAZ files "split0000.laz", "split0001.laz", "split0002.laz", "split0003.laz".

You could also use the "free" las2las.exe (http://lastools.org/download/las2las_README.txt) with the option '-subseq 0 500000000' to manually cut the LAS file into pieces of different size. If you want to do spatial cuts then ask me how to do this but you may already know that either lastile.exe (http://lastools.org/download/lastile_README.txt) or the "free" las2las.exe are the likely contenders for a spatial split ...

Regards,

Martin @rapidlasso

http://rapidlasso.com - fast tools to catch reality
Reply all
Reply to author
Forward
0 new messages