Relax with laxpy. Let it handle your spatial queries for you!
laxpy is a way to read and write .lax files generated from lasindex in Python. I have ambitions to merge this into
the laspy codebase, but for now this standalone package can handle spatial queries in conjuction with laspy and
presence of .lax files that match the name of the .las file you are interested in querying.
Why Index?
Indexing LiDAR data is only relevant if the entire file is not needed. This most frequently happens when LiDAR files need to be clipped using some geometry smaller than the original file extent. Indexing allows loading smaller chunks of the file into memory, rather than the whole thing, at the cost of some initial overhead.
Whether or not indexing ultimately increases computational efficiency depends on the clipping geometry, and the structure and size of the LiDAR file.
Release Status
Current Release: 0.2.3
Status: laxpy is in a stable condition.
Installation
# via pip
pip install laxpy
# via GitHub
git clone https://github.com/brycefrank/laxpy.git
cd laxpy
pip install .
# via conda
conda install laxpy -n <your environment> -c conda-forge
Example
Clipping a Polygon
laxpy clips a shapely polygon by adjusting the memory map (an internal mechanism in laspy) of the original reference object.
Long story short, this is done in place in the following manner:
from laxpy import IndexedLAS
my_las = IndexedLAS('my_las.las')
my_las.map_polygon(my_shapely_polygon)
# Print the points within the polygon
print(my_las.points)
Note that an IndexedLAS object inherits directly from laspy.file.File, and all dimensions are available for querying,
including .x, .y, etc. etc.
Metadata
Release files for laxpy 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| laxpy-0.2.3.tar.gz | 7.8 kB | Without provenance | Details for laxpy-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| laxpy-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for laxpy-0.2.3-py3-none-any.whl |
Total release size: 17.0 kB
Release files / laxpy-0.2.3.tar.gz
| Download URL | laxpy-0.2.3.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7982176cb9939dd59f61d72022ce4a20bf97cd72415a35aede74ef5bd6504997
|
|
BLAKE2b-256 checksum How to use checksums |
261f48b50278b004e555dc06f42434d3ace13bfc986d41f9472018fc6a300086
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / laxpy-0.2.3-py3-none-any.whl
| Download URL | laxpy-0.2.3-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83282752bfc8f9d1268a89b57d96f130a13092d73342114847b39d19850dde21
|
|
BLAKE2b-256 checksum How to use checksums |
1bee81b5910e9151eba81dba6f1a626944ff829d7f18854f486aff1c8726e2f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for laxpy 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.