1

Is there any tool available for extracting the X, Y and Z coordinates from a .las file and exporting them to a .csv or similar file?

  • 1
    Welcome to GIS SE! Are you looking for new software or do you already have GIS software and are just looking for a tool you have not used? – PolyGeo Jul 22 '13 at 11:01
7

las2txt from liblas.org may do what you want:

http://www.liblas.org/utilities/las2txt.html

2

Assume the following:

  • .las file = input.las.
  • input.las path: C:\lidar\input.las.
  • .csv file: output.csv.
  • output.csv path: C:\lidar\output.csv.

With Fusion, the command line to export as CSV is LDA2ASCII. Its syntax is:

LDA2ASCII InputFile OutputFile format 

Write the following:

C:\Fusion\LDA2ASCII C:\lidar\input.las C:\lidar\output.csv. 0  

The argument 0 will export only the x, y and z coordinates (use 1 to also export: nadir angle and intensity values). It will create the file output.csv in the folder c:\lidar.

In the example above, Fusion was installed under C:\Fusion.


With R, there is the readLAS function from the rLiDAR package, which can be used to import .las files. Then, converting it as CSV is simple.

library(rLiDAR)
rLAS <- readLAS("C:\\lidar\\input.las", short=TRUE) #use short = FALSE to display more columns with data associated to each return. For example: classification code, gps time, etc.
rLAS <- data.frame(rLAS)
head(rLAS,3) #see first three rows

       X       Y      Z Intensity ReturnNumber
732652.6 7459140 31.194        24            1
732652.7 7459141 31.426        58            1
732652.7 7459141 31.253        17            1

write.csv(rLAS,"C:\\lidar\\output.csv")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.