Laspy
Laspy is a python library for reading, modifying and creating LAS LiDAR files.
Laspy is compatible with Python 3.8+.
Features
- LAS support.
- LAZ support via
lazrsorlaszipbackend. - LAS/LAZ streamed/chunked reading/writting.
- COPC support over files.
- COPC support over https with
requestspackage. - CRS support via
pyprojpackage.
Examples
Directly read and write las
import laspy
las = laspy.read('filename.las')
las.points = las.points[las.classification == 2]
las.write('ground.laz')
Open data to inspect header (opening only reads the header and vlrs)
import laspy
with laspy.open('filename.las') as f:
print(f"Point format: {f.header.point_format}")
print(f"Number of points: {f.header.point_count}")
print(f"Number of vlrs: {len(f.header.vlrs)}")
Use the 'chunked' reading & writing features
import laspy
with laspy.open('big.laz') as input_las:
with laspy.open('ground.laz', mode="w", header=input_las.header) as ground_las:
for points in input_las.chunk_iterator(2_000_000):
ground_las.write_points(points[points.classification == 2])
Appending points to existing file
import laspy
with laspy.open('big.laz') as input_las:
with laspy.open('ground.laz', mode="a") as ground_las:
for points in input_las.chunk_iterator(2_000_000):
ground_las.append_points(points[points.classification == 2])
API Documentation and tutorials are available at ReadTheDocs.
Installation
Laspy can be installed either with pip:
pip install laspy # without LAZ support
# Or
pip install laspy[laszip] # with LAZ support via LASzip
# Or
pip install laspy[lazrs] # with LAZ support via lazrs
Changelog
See CHANGELOG.md
Release files for laspy 2.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| laspy-2.7.0.tar.gz | 1.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| laspy-2.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.0 MB
Release files / laspy-2.7.0.tar.gz
| Download URL | laspy-2.7.0.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f56feb5445e75d6ff12ee814aab6a35339290e75264ff277c6bf553f3025a3f5
|
|
BLAKE2b-256 checksum How to use checksums |
9c5d5a540ac25dcc57fa77691363bb753363b192a3759aefef4b40e1250ddb17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / laspy-2.7.0-py3-none-any.whl
| Download URL | laspy-2.7.0-py3-none-any.whl |
|---|---|
| Size | 86.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15f5344c62a1023461996bdf5d1ba5fdd813e96694a524fee712931134f3792f
|
|
BLAKE2b-256 checksum How to use checksums |
edfbae27ebca327117e35cc717a3a87afdcbbf10d5aac52e405d16ebe777357e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|