Skip to main content

Native Python ASPRS LAS read/write library

Project description

Laspy

Laspy is a python library for reading, modifying and creating LAS LiDAR files.

Introduction

Laspy is a pythonic library for reading, modifying and writing LAS files. Support for LAZ files rely on the external libraries LASzip and LAStools and is limited to reading LAS version 1.0-1.3 files. Laspy is compatible with Python 2.6+ and 3.5+.

Laspy includes a set of command line tools which can be used to do basic file operations like format translation and validation as well as comparing LAS files.

Example

A simple example to show the basics of Laspy. Here we create an output file that only consists of terrain points from the input file:

from laspy.file import File

inFile = File('/path/to/file.las', mode='r')

I = inFile.Classification == 2

outFile = File('/path/to/output.las', mode='w', header=inFile.header)
outFile.points = inFile.points[I]
outFile.close()

API Documentation and tutorials are available at ReadTheDocs.

Installation

Laspy can be installed either with pip:

pip install laspy

or by running the setup script included in the source distribution:

python setup.py build --user
python setup.py install --user

Laspy is only dependent on numpy and should therefore work on Linux, OS X and Windows as long as a working installation of numpy is available.

To install LASzip and LAStools for LAZ support on Unix systems:

git clone https://github.com/LASzip/LASzip.git
cd LASzip
git checkout 3.4.3
cmake .
make
sudo make install

and

wget http://lastools.org/download/LAStools.zip
unzip LAStools.zip
cd LAStools
make
sudo cp bin/laszip /usr/local/bin
sudo ln -s /usr/local/bin/laszip /usr/local/bin laszip-cli

Changelog

Version 1.7.1

  • Fixed numpy version check (issue #128, PR #129)

Version 1.7.0

  • Fixed bug in point record format 5, 9 and 10 #105
  • Return explicit msg if laszip executable was not found #110
  • Supprt numpy 1.17 #122

Version 1.6.0

  • Bug fix #92
  • Test creation of all valid custom dimension data types
  • Modify handling of extra bytes to be char data instead of numeric byte data

Version 1.5.1

Version 1.5.0

  • Improved memory handling in base.FileManager #48
  • Introduced r- file mode, that only reads the header of as LAS file #48
  • LAS v. 1.4 bug fixes #55
  • Python 3 support #62

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

laspy-1.7.1.tar.gz (55.9 kB view details)

Uploaded Source

File details

Details for the file laspy-1.7.1.tar.gz.

File metadata

  • Download URL: laspy-1.7.1.tar.gz
  • Upload date:
  • Size: 55.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.2

File hashes

Hashes for laspy-1.7.1.tar.gz
Algorithm Hash digest
SHA256 4dca394226b80616c4f7d9083abd4942ed95aa39f20e0c442df31a384e852f4b
MD5 8ea8fb39db26bae12a14e04618e54c74
BLAKE2b-256 f0df358309be3eab09f02e9b9f560dd0c20998a8e7bff5153ebea3ce6bcb6418

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page