A Python API for .lax files
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file laxpy-0.2.3.tar.gz.
File metadata
- Download URL: laxpy-0.2.3.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7982176cb9939dd59f61d72022ce4a20bf97cd72415a35aede74ef5bd6504997
|
|
| MD5 |
d6f3c55f87eb313a69bd4ab7db7ff144
|
|
| BLAKE2b-256 |
261f48b50278b004e555dc06f42434d3ace13bfc986d41f9472018fc6a300086
|
File details
Details for the file laxpy-0.2.3-py3-none-any.whl.
File metadata
- Download URL: laxpy-0.2.3-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83282752bfc8f9d1268a89b57d96f130a13092d73342114847b39d19850dde21
|
|
| MD5 |
53f1f6087d541884187403bce79e7ec2
|
|
| BLAKE2b-256 |
1bee81b5910e9151eba81dba6f1a626944ff829d7f18854f486aff1c8726e2f1
|