In this post, PDAL will be used to colorize a LAS file using multiple tiles of GeoTIFF image files - four to be exact. You just need to create a pipeline that loads in the LAS file, apply the RGB values from each image file individually and write the colored points into an output LAS file. The following sections illustrate this workflow.
Here's how the source LAS and GeoTIFF files look like.
|The source LiDAR LAS file displayed by elevation
|The source GeoTIFF raster image files
- Using a text editor, type in the JSON syntax to colorize a LAS file using PDAL's colorization filter, as shown below.
uncompahgre.laz is the source LAS file,
tile0.tif, tile1.tif, tile2.tif and tile3.tif are the source image files,
and color.laz is the output LAS file name
- Save the text into a file e.g. colorLas.json.
A sample pipeline JSON is show in the listing below.
Run the colorization process
- Open up a OSGeo4W Command Prompt.
- At the prompt, type in the pdal pipeline command:
c:\> pdal pipeline colorLas.json
where colorLas.json is the pipeline JSON file created in the previous section.
- Run the command.
Processing messages appear.
The output colorized LAS file color.laz is generated.
- Optional. Display the resultant colored LAS file in a LAS Viewer.