PyLidar

Introduction

A set of Python modules which makes it easy to write lidar processing code in Python. Based on SPDLib and built on top of RIOS it handles the details of opening and closing files, checking alignment of projection and grid, stepping through the data in small blocks, etc., allowing the programmer to concentrate on the processing involved. It is licensed under GPL 3.

See SPD V4 Format Description for description of the SPD V4 file format. Supported formats are: SPD V3, SPD V4, RIEGL RXP, LAS, LVIS, ASCII and Pulsewaves (additional libraries may be required).

See the How to Visualise Arrays page to understand how numpy arrays are used in PyLidar.

Work funded by:

There is a Google Group where users can post questions.

Examples

See Processor Examples for more information on programming using PyLidar. See the following links for more information on running the command line utilities:

Downloads

Source

Source code is available from GitHub. RIOS, Numba, Numpy and h5py are required dependencies. Additional formats require environment variables set to the root installation of other libraries before building as detailed in this table:

Type of Files Environment Variable(s) Link to Software
LAS/LAZ LASTOOLS_ROOT lastools
Riegl RIVLIB_ROOT RIWAVELIB_ROOT RDBLIB_ROOT RiVLIB RiWaveLIB RDBLib
ASCII .gz ZLIB_ROOT zlib
PulseWaves PULSEWAVES_ROOT pulsewaves

The related pynninterp module is used for some interpolation operations.

Test Suite

After installation, run pylidar_test to run a number of tests to check that the install is OK. You will need the latest testdata_X.tar.gz file (with the highest ‘X’) from the links in the wiki page. Pass the path to this file to pylidar_test with the -i option.

Conda

Conda packages are available under the ‘rios’ channel. Once you have installed Conda, run the following commands on the command line to install pylidar (dependencies are obtained automatically):

conda config --add channels conda-forge
conda config --add channels rios
conda create -n myenv pylidar
conda activate myenv

The related pynninterp module is used for some interpolation operations and can be installed via Conda also from the ‘rios’ channel:

conda install pynninterp

Testing

Indices and tables