Questions tagged [laspy]

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

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

Update LAS file metadata

I have updated the x,y,z coordinates for my LAS file, using the solution from here, however the modified date for the file does not change, it stays the same. Is it possible to update it?
3
votes
1answer
194 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
1answer
52 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
1answer
73 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
0answers
48 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
2answers
115 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 ...
1
vote
1answer
79 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://...
1
vote
1answer
113 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
1answer
25 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 ...
2
votes
0answers
114 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
113 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
96 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
265 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
118 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
146 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
625 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
559 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 arrays....
3
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
225 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 ...
2
votes
1answer
1k 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
218 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
4k 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
819 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
84 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 ...
5
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
148 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
752 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
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
246 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)...
4
votes
3answers
5k 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
1k 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 ...