Skip to content

Instantly share code, notes, and snippets.

@bertt
Last active August 15, 2024 06:00
Show Gist options
  • Save bertt/e64bc5d1fa0be80c82df2d3971205e78 to your computer and use it in GitHub Desktop.
Save bertt/e64bc5d1fa0be80c82df2d3971205e78 to your computer and use it in GitHub Desktop.
PDAL pipeline to convert LAZ to CSV

PDAL run pipeline to convert LAZ to CSV (keeping only X, Y, Z)

pdal pipeline see https://pdal.io/en/2.7.2/pipeline.html

Run the following command:

pdal pipeline pipeline.json

Tool 'pdal' is installed with QGIS in the bin directory, example on Windows: C:\Program Files\QGIS 3.34.2\bin\

With the following laz file:

https://storage.sbg.cloud.ovh.net/v1/AUTH_63234f509d6048bca3c9fd7928720ca1/ppk-lidar/US/LHD_FXX_1189_6161_PTS_O_LAMB93_IGN69.copc.laz

With the following pipeline.json:

{
    "pipeline":[
       {
          "type":"readers.las",
          "filename":"LHD_FXX_1189_6161_PTS_O_LAMB93_IGN69.copc.laz"
       },
       {
          "type":"writers.text",
          "format": "csv",
          "filename":"output.csv",
          "keep_unspecified":"false",
          "order":"X,Y,Z",
          "delimiter":","
       }
    ]
 }

Result outputcsv in EPSG:2154 coordinates:

"X","Y","Z"
1189875.410,6160250.060,2479.990
1189875.040,6160250.560,2481.980
1189876.150,6160250.050,2479.260
1189875.230,6160251.550,2482.000
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment