Recent versions of SAGA GIS no longer support importing files in the .las format. However, a .las file can be converted using PDAL’s writers.text module into a text file format, which in turn can be imported in SAGA. For this example, we will begin with a .las file projected in a state plane CRS that is the output of my post Reprojecting LIDAR .las files to Latitude/Longitude to State Plane Example.
- Open a new text file named
las2xyz.json
in the same directory as your.las
file and paste the following into it:{ "pipeline": [ { "type": "readers.las", "filename": "20131013_usgs_olympic_wa_10TDT310990.las" }, { "type": "writers.text", "order": "X,Y,Z", "keep_unspecified": "false", "quote_header": "false", "delimiter": ",", "filename": "20131013_usgs_olympic_wa_10TDT310990.txt" } ] }
- Now run the pipeline. This may take a while. Once it completes, you should now see the converted
.txt
file in the working directory.pdal pipeline las2xyz.json ls -hs -1 total 1.1G 227M 20131013_usgs_olympic_wa_10TDT310990.las 148M 20131013_usgs_olympic_wa_10TDT310990.laz 745M 20131013_usgs_olympic_wa_10TDT310990.txt 4.0K las2xyz.json 4.0K lat_lng_WA_S_FIPS_ft_reprojection.pipeline.json
- Let’s perform a quick sanity check on this new file:
less 20131013_usgs_olympic_wa_10TDT310990.txt X,Y,Z 803169.892,932562.842,2093.730 803170.060,932566.158,2093.070 803178.839,932573.593,2054.360 803170.851,932564.554,2093.700 803225.508,932562.372,2043.070 803232.723,932560.928,2040.090 803232.361,932562.222,2041.790 803232.443,932564.117,2041.470 803234.863,932568.358,2030.210 803235.004,932568.206,2034.440 803236.294,932567.895,2028.310
- Open SAGA GIS. From the Geoprocessing menu, select File -> Tables -> Import -> Import Text Table with Numbers only
- Select the
.txt
point cloud file that was created by PDAL, with the appropriate options as shown in the screenshot. Click Okay. Since the example text file used is nearly 1.0 GB in size, importing may take some time.
- Once the text file has been imported as a table into SAGA, select Geoprocessing -> Shapes -> Point Clouds -> Conversion -> Point Cloud from Table.
- Select the table that was created in the previous step, and then set the values for X/Y/Z to these columns from the table.
- Afterwards, you will get the point cloud generated in your data sources.
- From the Geoprocessing menu, select Visualization -> 3D Viewer -> Point Cloud Viewer. Select
Z
as the colored attribute.
- Click Okay. The point cloud will be displayed in SAGA’s Point Cloud Viewer tool: