[R] Working with LiDAR .las files

Roger Bivand Roger.Bivand at nhh.no
Tue Jun 17 06:21:16 CEST 2008


Etienne Bellemare Racine <etiennebr <at> gmail.com> writes:

> 
> Hi,
> 
> I am working with airborne LiDAR data and R. Do you know of any package 
> or project designed to achieve that goal ? Largely, if you are using R 
> and .las files (or lidar data), I would like to hear about your work 
> flow. Otherwise, if you know of a package that can help handling x,y,z 
> data (i.e., visualisation, sampling, triangulation, etc.) I would also 
> like to hear about it.

There have been many discussions on the GDAL development list about 
converting this format, and it seems that people are recommended to 
convert to shapefile using a Python script referenced:

http://www.perrygeo.net/wordpress/?cat=3

and elsewhere. If you need to subset, I would suggest going to a text 
representation and using the facilities in readLines(), or trying to use 
readBin() directly on the *.las file. Writing a function using readBin()
should be possible as the *.las format is said to be well-documented.

With very large data sets, you may prefer to run it into a data base 
(PostGIS or MySQL with spatial support), and use readOGR() in the rgdal 
package from there with SQL selection.

You may like to follow this up on the R-sig-geo list.

Roger

> 
> Currently, I transfer .las files to .dbf and then read them with foreign 
> package to a data frame. I take a smaller sample and plot it with rgl or 
> scattereplot3d. But I would like to read directly from las to data 
> frame, and if it is too large, specify a study area.
>



More information about the R-help mailing list