Questions tagged [laspy]
A Python library for reading, modifying, and creating LIDAR files.
42
questions
3
votes
2
answers
72
views
Why is laspy X,Y co-ordinate different to X,Y co-ordinate in lidr
I am working in both r and python to process lidar data with .las format. One thing I have noticed is that the x,y co-ordinate when working with laspy is different than x,y co-ordinate when using lidr....
0
votes
0
answers
22
views
TypeError attempting conversion of txt file to las pointcloud format using pandas & laspy
I'm following this guide - https://pointly.medium.com/how-to-convert-your-point-cloud-data-into-las-laz-434ada0f1e99
Attempting a conversion from a txt file to las
My bathymetry data is in following ...
0
votes
0
answers
20
views
Some points are missing after using LAS classification and filtering points based on clarification and rewrite into a new file
I need to save .laz file that have only point cloud data corresponding to water classification. I used following code, it works. But it significantly reduce number of points from original file.
import ...
0
votes
1
answer
247
views
Plotting LiDAR data with matplotlib
I am trying to plot a las file with one million points in Matplotlib. When I try to plot the file it always gives me a blank result.
This is the code I am using:
import numpy as np
import laspy
from ...
1
vote
1
answer
1k
views
Get CRS projection from LAS file using laspy
I have a LAS pointcloud file, I'm trying to get the projection. I've tried accessing the header and I've browsed through the las object after using laspy to import it.
file = os.path.normpath(file)...
3
votes
1
answer
341
views
Using LasPy to create a new LAS file based on another, while preserving geographic location of the points?
I have an input LAS file that has lots of points, that also includes RGB and other info besides the XYZ. My goal is to select only the XYZ of the ground points, preserving the geographic location, ...
2
votes
1
answer
257
views
Converting pointcloud data in UTM in txt to LAS
I have text file with point cloud data in UTM format, say
sample=[632535.222, 4858488.332, 150.555]
I am currently using laspy, the parsing from txt is ready, and I plan to generate a new las file ...
0
votes
1
answer
231
views
Point inside the polygon
I'm working in Python with a .las file which I open with laspy and a .shp file which I open with the shapefile library.
I have multiple polygons in the shapefile and the task is for each polygon to ...
0
votes
2
answers
2k
views
Converting LAZ to LAS using laspy
I would like to convert .laz file to .las. I am using Python and I have installed laspy with lazrs extension.
I tried in Pyscripter (v4.0) following solution (this solution was mentioned here: Reading ...
1
vote
1
answer
1k
views
Append .las files using laspy
I am attempting to append .las files to another .las file using laspy. Basically, I have a collection of .las files that I need to merge into one large .las file (it's for input into a different ...
3
votes
1
answer
1k
views
Change projection for LAS file
I have read a LAS file. If I import it in Global Mapper it says the projection, however when I read it with laspy (header.proj_id_1) there is no information associated.
I have edited the coordinates ...
0
votes
1
answer
266
views
Update LAS file
I have a LAS file. I read it, read each X, Y and Z dimension, then use a script to convert the values to a customised projection. I want to update the values to the existing file.
I have tried writing ...
0
votes
1
answer
968
views
Understanding the spacial reference/How to get latitude and longitude from a .las LiDAR file
I have downloaded some .las files from a LiDAR project listed on the USGS website. I am hoping to process them in Python. I was able to get the set of X,Y, and Z points using the following snippit in ...
0
votes
0
answers
294
views
How can the GeoKeyDirectoryTag byte string be decoded from a las header vlrs?
I am currently reading a .las file with laspy and transforming the points to a custom state plane coordinate system. I would like to update the GeoKeyDirectoryTag but cannot find information on how ...
2
votes
2
answers
835
views
Writing LAZ file using laspy
I am new for handling lidar data. Actually I am using laspy for read and write laz file. I am using following syntax for writing LAZ file. It is created LAZ file on specified folder path but it took ...
3
votes
1
answer
970
views
How to get VLRs from a .las file with laspy
I have a .las point cloud data file that I am trying to get the vlr data from. I have found this link - Update EVLR header info for .LAS file using laspy and have read the docs on Laspy - https://...
2
votes
1
answer
1k
views
Saving to LAS file using laspy, correctly
I have a text file, each line in the text file has X,Y and Z coordinates eg:
551124.5841823021 470778.1953796738 318.1167521614109
I want to read the data and export it to LAS format, by using laspy....
0
votes
1
answer
192
views
Laspy outfile gives zero decimal points in coordinates
Im detecting trees and want to create a .las file to be able to display it in Cloud Compare. I can not wrap my head around why this is not working. The scale should allow for 6 decimal points but it ...
3
votes
0
answers
529
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
1
answer
618
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
1
answer
898
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
1
answer
831
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
0
answers
368
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))...
5
votes
0
answers
266
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
1
answer
1k
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
1
answer
917
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
2
answers
3k
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 arrays....
3
votes
0
answers
2k
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
0
answers
288
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 ...
3
votes
1
answer
3k
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
0
answers
287
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
2
answers
5k
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
1
answer
1k
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 ...
4
votes
1
answer
4k
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
0
answers
137
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 ...
6
votes
1
answer
3k
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
0
answers
224
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
1
answer
1k
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"): ...
5
votes
1
answer
3k
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
0
answers
313
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)...
7
votes
4
answers
8k
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.
How do I create a new file from scratch ...
3
votes
1
answer
2k
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 ...