# 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 laspy.open('laspytests/data/simple.laz') as fh:
        print('Points from Header:', fh.header.point_count)
        las = fh.read()
        print(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:
        1:239
        2:25
        3:11
        4:1

## User Guide

- Installation
  - Short Instructions
  - Optional dependencies / features
- What is a LAS file ?
  - Header
  - VLRs
  - Point Records
  - EVLRs
- Basic Manipulation
  - Opening & Reading
  - Writing
  - Creating
  - Converting
  - Accessing the file header
  - Accessing Points Records
  - Manipulating VLRs
- Examples
  - Filtering
  - Creating from scratch
  - Using chunked reading & writing
  - COPC
- A Complete Example
- Less Basic Things
  - Extra Dimensions
  - Custom VLRs
- Migration guides
  - From laspy 1.7.x to laspy 2.0.0
  - From pylas 0.4.x to laspy 2.0.0
- Changelog
  - Version 2.5.3 (4/01/2024)
  - Version 2.5.2 (2/01/2024)
  - Version 2.5.1 (28/07/2023)
  - Version 2.5.0 (23/07/2023)
  - Version 2.4.1 (20/02/2022)
  - Version 2.4.0 (11/02/2022)
  - Added
  - Changed
  - Fixed
  - Version 2.3.0 (25/10/2022)
  - Version 2.2.0 (29/06/2022)
  - Version 2.2.0 beta 1 (14/06/2022)
  - Version 2.2.0 beta 0 (03/05/2022)
  - Version 2.1.2 (18/02/2022)
  - Version 2.1.1 (23/01/2022)
  - Version 2.1.0 (09/01/2022)
  - Version 2.0.3 (16/09/2021)
  - Version 2.0.2 (23/07/2021)
  - Version 2.0.1 (29/06/2021)
  - Version 2.0.0 (15/06/2021)
  - Version 1.7.0 (13/03/2020)
  - Version 1.6.0 (11/10/2018)
  - Version 1.5.1 (5/12/2017)
  - Version 1.5.0 (30/03/2017)
- Contributing
  - Setup
  - Commands

## API Documentation

- API Documentation
  - Re-exported functions
  - Re-exported classes
  - Submodules

## Indices and tables

- Index

- Module Index

- Search Page