LiDAR data in BASH using libLAS

At home, I work on a Mac, so when I want to do work here, my scripting language changes.  In this case, I prefer BASH as my control script.  I downloaded libLAS and did the standard Unix ./configure, make, sudo make install dance in the decompressed libLAS directory

./configure
make
sudo make install

Now I have some tools to manipulate LiDAR las files at home.  To convert all my las files to text:

#!/bin/bash
for f in $( ls *.las); do
 las2txt --parse xyzinrcpM --header pound $f $f.txt
done

There are more elegant ways to implement this, but it gets the job done… .  Now I have a few hundred text files with all the relevant LiDAR info in them for manipulation.  Since working with the whole enchilada in PostGIS failed, I think I’ll approach it by loading one section at a time, analyzing, and removing those data from the table.  More to come… .

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.