laspy: Python library for lidar LAS/LAZ IO.

LAS (and its compressed counterpart LAZ), is a popular format for lidar pointcloud and full waveform, laspy reads and writes these formats and provides a Python API via Numpy Arrays.

Here is an example of reading in LAZ data and getting some simple summaries of the pointcloud:

import numpy as np
import laspy

with'laspytests/data/simple.laz') as fh:
    print('Points from Header:', fh.header.point_count)
    las =
    print('Points from data:', len(las.points))
    ground_pts = las.classification == 2
    bins, counts = np.unique(las.return_number[ground_pts], return_counts=True)
    print('Ground Point Return Number distribution:')
    for r,c in zip(bins,counts):
        print('    {}:{}'.format(r,c))

Would output:

Points from Header: 1065
<LasData(1.2, point fmt: <PointFormat(3)>, 1065 points, 0 vlrs)>
Points from data: 1065
Ground Point Return Number distribution:

User Guide

API Documentation

Indices and tables