Questions tagged [laspy]

A Python library for reading, modifying, and creating LIDAR files.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Adding RGB values from a .txt file to a .las file using laspy

I have a text file that has XYZ and RGB values in it. To convert it to .las format i use lfile = laspy.file.File(r"D:\las\tolas.las", mode='w',header=LasHeader(x_scale=0.01,y_scale=0.01,z_scale=0.01))...
4
votes
0answers
61 views

Maintaining extra data for .laz for use in R and Python?

I am working on releasing a benchmark dataset for trees in RGB + Lidar and I'd like the format to match the most common use cases and packages. I had been intending on proving a tree index using the ...
1
vote
1answer
101 views

append X,Y,Z and intensity values into a las file

I want to append XYZI values row after row into a las file.How to do this? I'm using python laspy library to write XYZI points at once, but i want to append row after row using a loop. The points are ...
2
votes
1answer
163 views

Extracting projection from each LAS file in directory using ArcPy?

I am using ArcPy to automate the conversion of LAS files to Raster in ArcGIS. I'd like to extract the spatial reference from each LAS file along the way. Is it possible to do this using ArcPy tools?...
1
vote
2answers
450 views

Adding RGB values to Laspy synthetic point generation?

What is the correct way to add RGB values to points made from scratch? Laspy is working great for me so far. I want to add RGB values to synthetic points that I've generated. I am using 2 numpy ...
2
votes
0answers
557 views

LiDAR point cloud to numpy array to raster?

I'm looking for a way to create a height raster (raster of z values - i.e. not just ground poinits). I can accomplish this with gdal by creating a point vector layer from the numpy array then using ...
1
vote
0answers
135 views

Create laspy file object without creating a new file

I would like to create a new laspy.file.File object in memory without having to create a reference .las file. The basic procedure is read sample.las clip sample.las by converting the x and y ...
1
vote
1answer
256 views

Visualizing LAS with matplotlib

I'm trying to create a 3D scatterplot using an las file that contains xyz and return values. I want to keep all returns but would like to subset the cloud. I've learned how to subset using laspy so no ...
1
vote
0answers
159 views

FUSION's PolyClipData creates corrupt LAS file?

I am trying to learn LASPY and am following a tutorial. I got an error when starting up using: import laspy infile = laspy.file.File("./laspytest/data/simple.las", mode="r") where I got a storage ...
1
vote
2answers
1k views

laspy ValueError: buffer size must be a multiple of element size

I am trying to learn LASPY and am running into road blocks off the bat. I first ran into and Error 8 (Not enough storage is available to process this command) using my full sized LAS file (1.7GB). I ...
6
votes
1answer
446 views

Laspy exception: “Invalid format”

I am attempting to open a couple of las files in laspy, however one of them has file version 6.0 (although it does not show up as such in lasinfo - I may be missing something). Digging through the ...
3
votes
1answer
1k views

Classifying LiDAR ground points using laspy?

I have a classified LiDAR point cloud (.las) with misclassifications. The walls of steep surfaces that should be ground (class 2) have been misclassified as vegetation (classes 3, 4, 5). I am ...
1
vote
0answers
52 views

Make NumPy wrapper for laspy memory view with more than one attribute (i.e., inFile.XYZ)?

I'm trying to use lidar point X, Y, and Z coordinates (from .las files) in calculations. I'm using Python 2.7.13 (x64), with laspy 1.5.0. Reading attributes one at a time with the following is ...
2
votes
1answer
1k views

Inserting LiDAR points (from laspy) in GeoDataFrame without using a numpy array?

Working with Python 3.6 (Anaconda) under Windows using a laspy fork that works with Python 3 (https://github.com/sethrh/laspy). I am loading a LAS file to a GeoPandas GeoDataFrame to eventually ...
1
vote
0answers
121 views

Update EVLR header info for very large LAS files using laspy

I ran into another problem when applying my workaround to large LAS files. The issue is noted at the github page for laspy here: https://github.com/grantbrown/laspy/issues/51 This builds on an earlier ...
2
votes
1answer
460 views

Update EVLR header info for .LAS file using laspy

I'm trying to change the header info for a LAS file using the python 2.7 (64-bit) laspy module (version 1.2.5). I'm attempting to follow the example shown here (in the section "Writing Data + EVLRS"): ...
4
votes
1answer
1k views

Converting between coordinate systems for LAS file using LASPY

I am trying to convert a .las file from WGS84 to UTM17. I have some drone imagery that was used to generate a 3d point cloud/ .las file, but it is in latitude/ longitude instead of easting/ northing. ...
2
votes
0answers
187 views

Improving performance of Laspy? [closed]

I have a working code for a project, but right now to run through the data it would take years to be completed. Please help me to improve it: import laspy import laspy.file import numpy as np (ch1)...
3
votes
3answers
2k views

Use laspy to create las file from scratch without opening an existing las file first

I have found instructions for creating a las file by opening an existing file, modifying it, then re-saving it. This re-uses the headers from the original file. But how do I create a new file from ...
3
votes
1answer
717 views

Reading las files with laspy [closed]

New to laspy and encountering an error. The first code block describes the file header, the second (In[24]) fails to open the file with laspy: In [21]: import numpy import laspy from laspy.file ...