[GRASS-dev] v.out.lidar: export point cloud from GRASS

Hi all,

in r66855 I’ve implemented an export module for LAS files. The main motivation is creating test data for v.in.lidar and r.in.lidar and visualization of points in plas.io. Most of the lidar attributes are supported when provided in attribute table or as categories in separate layers.

Colors can be also stored in the separate layers as proposed earlier on the mailing list. There is nothing in GRASS currently which could write it (I’ve used modified v.in.lidar) but two options are supported, one color per layer and RGB as one category (using bit shifts). There is a discussion for this linked below.

All the layers and columns (one per attribute) are causing quite long option list. In GUI, it is well separated using guisection but it is a lot of to fill out anyway. Layers cannot be avoided but perhaps columns can have some predefined names which would be used with a given flag enabled.

Current limitations: Skipping points without category, color entry in the attribute table or filtered out by where option is not supported. Some lidar point attributes are not yet supported. Offsets and scales for coordinates are not supported. Z coordinate is always expected.

In addition to the color options above, a possible improvement would be specifying color table for z values as it is implemented in d.vect. This, however, requires min and max z which are accessible only with topology or after iterating over all data (well, unless user specifies z range or something).

Besides the usages mentioned above, it seems that v.out.lidar might be useful, with certain speed limitations, when using spatial selection in v.in.lidar or grid-based decimation in v.decimate, but LAS is the desired output format.

Vaclav

r66855: v.out.lidar: export vector as LAS
https://trac.osgeo.org/grass/changeset/66855

Using layers and categories for something else than ID and class
https://lists.osgeo.org/pipermail/grass-dev/2015-September/076552.html

v.in.lidar: limit the import to a set of polygons
https://lists.osgeo.org/pipermail/grass-dev/2015-November/077311.html

v.in.lidar: decimation (skip, preserve, offset, limit)
https://lists.osgeo.org/pipermail/grass-dev/2015-September/076275.html

v.decimate: point cloud decimation of native vector maps
https://lists.osgeo.org/pipermail/grass-dev/2015-September/076562.html
(not yet enabled in the parent Makefile)