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 development
- move to another folder, and
import simplaz
shouldn't return any error
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
simplaz-0.2.3.tar.gz
(6.1 kB
view hashes)
Built Distributions
simplaz-0.2.3-cp38-none-win_amd64.whl
(239.7 kB
view hashes)
simplaz-0.2.3-cp37-none-win_amd64.whl
(239.7 kB
view hashes)
simplaz-0.2.3-cp36-none-win_amd64.whl
(240.0 kB
view hashes)
Close
Hashes for simplaz-0.2.3-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f61a123fe12c103780fb24355c6dad03f0f5cc41cca8d2e15dfa8d54e676b42f |
|
MD5 | 169c7a769d0bbf7cd90b5fa581f917cc |
|
BLAKE2b-256 | ee2120095d75717818c725c4a6dd7a5e57f0f79e1805c18fd15cd19ec0147438 |
Close
Hashes for simplaz-0.2.3-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7037793fd28e2e56650d48f2fa54ddecf7e572cf5990b62853a349a0ff1677ec |
|
MD5 | 3ee6b47991a561b4a3461e97f478848b |
|
BLAKE2b-256 | 270b599a3e4e00c058240fde8b9679367e8d2e737b9b537156986074714f50a6 |
Close
Hashes for simplaz-0.2.3-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 778a78012c1f914cb00b1fedd38e868ab62a4f7ab276b994fe188f583c2ff344 |
|
MD5 | cfe7d66f331f6983827dbb1577dc9ddc |
|
BLAKE2b-256 | 05e841844094a66cf9a87d4c4e423dde4a2232370eab632d950e5d0e8fa9686e |
Close
Hashes for simplaz-0.2.3-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1df77524ce217d8bfec544019b35703c97b9c8af1cfc70b062f885f5ba231864 |
|
MD5 | 035c23fa068225f2988bd1ef10159012 |
|
BLAKE2b-256 | a7d6b56e83f527678dbe8a1512a31555c110bc7819b644e75eca9a8037ab9316 |
Close
Hashes for simplaz-0.2.3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3429c516c2b6f4c19183efceea71aaee6290698a9681499ef0e4968658ccc8b9 |
|
MD5 | 77686122205f4c2da1c38d6e6d9872bc |
|
BLAKE2b-256 | 8bb7b998bebe60576c10327e93930ec3add75814ed38c59a4fa09edb74989011 |
Close
Hashes for simplaz-0.2.3-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4cc8a77c0e435cc64bb24a460251b167729925c3e2526c7fe21d01fb0531aa5 |
|
MD5 | cbfde7673dbd8bca062d39e0a4e402a2 |
|
BLAKE2b-256 | c0e4a396102b7d586fabab911a307003ee27e127cdf3d7a02e2d7ced5a966729 |
Close
Hashes for simplaz-0.2.3-cp36-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bc0898f73a4d05e60f2afe1108b623100402060490fa3f47e8afac9c51e02ac |
|
MD5 | b482f6b7beede5d2b221712e719759e1 |
|
BLAKE2b-256 | b9a244d59397e05927285a8dd06551df441d994ed8d54ac8890af5c01f1e33de |
Close
Hashes for simplaz-0.2.3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbdcbc8cb9b0efd8a59a993ee86a6f52930bf52be2b50c56246b374a1739097f |
|
MD5 | ce4e968433f4734b7c933081239e9663 |
|
BLAKE2b-256 | da26d1dcbb8974da17a3fab05b84066f23aecaa42288c182c0397f3d394490c0 |
Close
Hashes for simplaz-0.2.3-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e990f97ea12e5f405aa6c225be0524775e7f99bc4de6715bae189ca1cfdf758 |
|
MD5 | e9512d17df2ccd4b0270c04f95755482 |
|
BLAKE2b-256 | 6feff5e3f3c5d303eea58d29f9129ac49b9f4bd1fe271e0e7326363eb3ac0c91 |