To use PDAL to perform the conversion, follow the following steps.
- In Windows, open up an OSGeo4W Shell.
- In the command prompt, change directory to the folder containing the LAS file e.g. D:\Temp\data\.
- Use a text editor to create a PDAL pipeline JSON file, e.g. las2xyz.json, with the following contents.
{ "pipeline":[ { "type":"readers.las", "filename":"color.las" }, { "type":"writers.text", "format":"csv", "order":"X,Y,Z,RED:0,GREEN:0,BLUE:0", "keep_unspecified":"false", "quote_header": "false", "delimiter": " ", "filename":"outputfile.xyz" } ] }
where color.las is the name of the input LAS file
and outputfile.xyz is obviously the name of the output XYZ file. - In the command prompt, type in the following command to perform the conversion.
D:\> pdal pipeline las2xyz.json
- Press Enter.
The X, Y, Z, R, G, B values of the LAS file are exported out into the text Point Cloud XYZ file.
No comments:
Post a Comment