[GRASS-dev] Re: [GRASS-user] LiDAR LAS import
markus.metz.giswork at googlemail.com
Wed May 25 07:48:19 EDT 2011
On Wed, May 25, 2011 at 12:16 PM, Hamish <hamish_b at yahoo.com> wrote:
> Markus Metz wrote:
>> Hi all,
>> GRASS 7 has a new module v.in.lidar for importing LiDAR LAS files
>> (*.las or *.laz). The LAS file format is commonly used for storing
>> LiDAR point clouds, but is unfortunately not supported by OGR.
>> v.in.lidar uses the libLAS library  and is only compiled if the
>> libLAS library is present.
>> I chose to use the library instead of writing a custom LAS reading
>> interface because the current LAS library version 1.6.1 is stable,
>> supports LAS file versions 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, each of
>> which can store LiDAR points in up to 5 different point formats. The
>> user and the interface do not need to know the file version and point
>> format of a given file, all that is conveniently handled by the libLAS
>> library in the background. The library has Large File Support (LFS)
>> and is well tested on different platforms, also with different
>> endian-ness. This functionality is not that easy to replicate.
>> You will need to get the libLAS library and configure GRASS 7 with
>> --with-liblas in order to have the module available. Please test!
>> Markus M
>>  http://www.liblas.org
> neat! any time trials to say how much faster it is than piping
> las2txt | v.in.ascii
Note that las2txt does NOT apply scale and offset to x,y,z, this would
need to be done afterwards in order to obtain correct coordinates.
Therefore the output of las2txt | v.in.ascii with the sample las file
I used is incorrect.
I discovered a bug in v.in.ascii: from a point file with | as field
only the first 3 columns will be imported because column 4 is empty
which means that columns 5 and 6 are skipped.
v.in.lidar is a notch faster than las2txt | v.in.ascii. And easier to use...
# sample las file with 1,287,775 points
# with table and topology
time las2txt -i points.las --stdout --parse xyztinrcCpedRGBau
--delimiter "|" | v.in.ascii in=- out=points_ascii -z x=1 y=2 z=3 --o
time v.in.lidar in=points.las out=points_las -o --o
# without table, with topology
time las2txt -i points.las --stdout --parse xyz --delimiter "|" |
v.in.ascii in=- out=points_ascii -zt x=1 y=2 z=3 --o
time v.in.lidar in=points.las out=points_las -ot --o
More information about the grass-dev