Questions tagged [laspy]

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

Filter by
Sorted by
Tagged with
2
votes
0answers
45 views

How to remove extra field from LAS file with laspy

I have LAS files with a useless extra scalar field (named "tree") that I would like to remove. I tried the following code to create a new LAS file, copy each field of the orginal LAS file ...
3
votes
1answer
55 views

Getting extent of a point cloud using laspy

As part of a geo-indexing script, I'd like to add in support for numerous .laz files we have sitting around on our SAN. The only intent of the handler is to grab the filename/path, the SRS, and the ...
0
votes
1answer
70 views

Laspy - Laszip & TypeError

I'm having some issues with Laspy and reading in .laz files. Previously I have had no problem with this, but it has stopped working. Initially I had a problem with the following error message: "laspy....
2
votes
1answer
146 views

Difference between classification methods with Laspy

I need to add classification to create a LAS file. I used the code below but it was miss-classified. Is there any problem with the code? And what is the difference between: out.file classification ...
0
votes
0answers
79 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
115 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 ...
2
votes
1answer
429 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 ...
3
votes
1answer
418 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
1k 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
1k 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
201 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
784 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
196 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
3k 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
698 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
2k 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
74 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 ...
3
votes
1answer
2k 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
142 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
638 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
2k 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
221 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
4k 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
910 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 ...