A simple Python package to read LAZ files (LAS too).
Project description
simplaz
A Python package to read LAZ files (LAS too). Basically it's a wrapper around Rust las and it exposes the most useful methods.
It doesn't read in memory the whole file, so you can just iterate over each point sequentially without worrying about your RAM comsumption.
Only reading at this moment; writing is for later.
Installation
pip
To install the latest release: pip install simplaz
Development
- install Rust (v1.39+)
- install maturin
maturin develop
- move to another folder, and
import simplaz
shouldn't return any error
Documentation
The pydoc can be found here.
Example
import simplaz
import numpy as np
ds = simplaz.read_file("/Users/hugo/data/ahn3/crop.laz")
header = ds.header
print("LAS v{}".format(header.version))
print("Point count: {}".format(header.number_of_points))
#-- using numpy functions
#-- define a specific numpy type
mypoint = np.dtype([('x','float64'),
('y', 'float64'),
('z', 'float64'),
('intensity', 'int16')]
)
pts = np.zeros((ds.header.number_of_points,), dtype=mypoint)
#-- iterate over all the points and store in numpy array only
#-- the ground point (classification=2)
for (i, p) in enumerate(ds):
if p.classification == 2:
pts[i][0] = p.x
pts[i][1] = p.y
pts[i][2] = p.z
pts[i][3] = p.classification
print (len(pts))
What is supported and what not?
Most of LAS v1.4 is supported, except:
- v1.4 support for extra bits after each point
LAS classes
Classification | description |
---|---|
0 | Created, never classified |
1 | Unclassfied |
2 | Ground |
3 | Low Vegetation |
4 | Medium Vegetation |
5 | High Vegetation |
6 | Building |
7 | Low Point (noise) |
8 | Model Key-point (mass point) |
9 | Water |
10 | Reserved for ASPRS definition |
11 | Reserved for ASPRS definition |
12 | Overlap Points |
13-31 | Reserved for ASPRS definition |
LAS Point format
This is well explained on this page.
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
Built Distributions
File details
Details for the file simplaz-0.3.0.tar.gz
.
File metadata
- Download URL: simplaz-0.3.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a2a9a479888b438b302403b682f935bfc9a7ad2a211b1697fc18a2477921435 |
|
MD5 | b034c53ee10d24065c93b3305fe18c1e |
|
BLAKE2b-256 | 1388538bf4536556df108b2ffd062129c054a06ccd9e4459e2ae7120512f7d21 |
File details
Details for the file simplaz-0.3.0-cp38-none-win_amd64.whl
.
File metadata
- Download URL: simplaz-0.3.0-cp38-none-win_amd64.whl
- Upload date:
- Size: 242.4 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf220d60ea9825264c35c4926952fffdedd1ec4e9513798142d04a7f1c85278d |
|
MD5 | ee15ee8effe954080fff49f3b08f67a5 |
|
BLAKE2b-256 | faaf8295592d572843d5d7c7b0e8b37f56a7c4c992c76678bb437a3e7d80234a |
File details
Details for the file simplaz-0.3.0-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: simplaz-0.3.0-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 282.6 kB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52024aa7b962428fc94c642e5d81a118e20fb026dbe5115f656a155604fbb992 |
|
MD5 | bc50bd6dab35f881647e0cf44ccd41b1 |
|
BLAKE2b-256 | d50318018ccb8f7379d0af3801a52949d6c44c8e6f3ab0cffbc89f67ecb3a26e |
File details
Details for the file simplaz-0.3.0-cp38-cp38-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: simplaz-0.3.0-cp38-cp38-macosx_10_7_x86_64.whl
- Upload date:
- Size: 239.3 kB
- Tags: CPython 3.8, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c71bc4a9b9a7a096e7397e45e60dd092dfeef1131ae9a0eb6e96c923e5d385a8 |
|
MD5 | 8dc2dc9fec260db3c42dde39fbf9ecc4 |
|
BLAKE2b-256 | f17ce957974c6e666d429133166fd2ad7bb53a6f9fbf6cb91e7204f0f0f5af86 |
File details
Details for the file simplaz-0.3.0-cp37-none-win_amd64.whl
.
File metadata
- Download URL: simplaz-0.3.0-cp37-none-win_amd64.whl
- Upload date:
- Size: 242.4 kB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d155f51a6356bd5c68cf1d8d40a1ab7ec259de52014e3c11f7816de098e1cdb5 |
|
MD5 | f4d9ddc8825fdf2352c01c980a7d7f19 |
|
BLAKE2b-256 | e19a3788ca25695ccd94d071cf6ea0b08c9070510486a86bd2548ada094ec38f |
File details
Details for the file simplaz-0.3.0-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: simplaz-0.3.0-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 282.6 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 569bdd242bf243f3e26c110e700190009d4c7f4194b6f46b57b76265ee0c203e |
|
MD5 | 1e0f8c409dec65fac433c22a66b17e27 |
|
BLAKE2b-256 | 4a21fee03ef2b4f8d5005eb0971c9b2790ec2348eec44b388f7f6ca3a003a853 |
File details
Details for the file simplaz-0.3.0-cp37-cp37m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: simplaz-0.3.0-cp37-cp37m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 239.3 kB
- Tags: CPython 3.7m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebcc88733c4917e08fb19207073834b1a649a6f95da2e077e8af0af0ee0137de |
|
MD5 | 2f9e0a24f8d6c5ec5b81f184fed1c1e3 |
|
BLAKE2b-256 | 22c7b8e5e47a6074f25c141399c70cb5aa5bee7b67197240f8564af2b3fa4d7e |
File details
Details for the file simplaz-0.3.0-cp36-none-win_amd64.whl
.
File metadata
- Download URL: simplaz-0.3.0-cp36-none-win_amd64.whl
- Upload date:
- Size: 242.6 kB
- Tags: CPython 3.6, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50006783ee4ab3ce5968762bf931e33915ee381387f3174838f0a7e5ad408356 |
|
MD5 | 779da18cee91543763eb5db85cd87d93 |
|
BLAKE2b-256 | 772ad253634ce5fdb834edb3dcc288a28ee99f37ab2be3ffd53d80a61367baf7 |
File details
Details for the file simplaz-0.3.0-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: simplaz-0.3.0-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 282.9 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 397a224e0bbf28534b1b984d02a78936f4a8adf4a365fd75573adc3990cef8e3 |
|
MD5 | baf55fd2c832a6c58389a02c5f895054 |
|
BLAKE2b-256 | 6e3d79b9886137edf9dc451acaeb38e7d023caa3a4fcb319ac6f33eeb54f87d8 |
File details
Details for the file simplaz-0.3.0-cp36-cp36m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: simplaz-0.3.0-cp36-cp36m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 239.5 kB
- Tags: CPython 3.6m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6630811311a3b1574b251aab4017a8458d53dc1cabd18aafc39d4bc81d5dcabe |
|
MD5 | f26218b5e88ce3c610cbc55a99a36230 |
|
BLAKE2b-256 | 49a9863adc51a7d78d8ddfd32c451564659bc9d7afbc3d6c9ae86a30387747d8 |