Skip to content

COLORIZE_AS_DEM

Generates a terrain-colored point cloud from a LAS/LAZ dataset by deriving a DEM from the points and using it to compute color values.

The workflow converts the point cloud to a DEM, applies a color palette, generates a hillshade, blends the two rasters, and drapes the result onto the original points. The output contains the same points as the input but with terrain-based RGB colorization derived from elevation.

Typical use: creating visually interpretable LiDAR datasets for web viewers such as Potree, Cesium, or other point cloud visualization systems. Particularly useful for bathymetric surveys and terrain models where elevation should drive color.


Contract

TypeCOLORIZE_AS_DEM
Acceptsinput_las: las
Producesoutput_las: las
Paramspallete (string), resolution (number)

Inputs

SlotTypeDescription
input_laslasSource point cloud dataset

Outputs

SlotTypeDescription
output_laslasPoint cloud with RGB values derived from terrain elevation

Parameters

NameTypeDescription
palletestringName of the GDAL .cpt color palette file to apply to the DEM
resolutionnumberDEM grid cell size used when rasterizing the point cloud

Note: pallete is intentionally spelled this way (matching the executor's param name in the database).


What it does internally

The workflow performs five stages:

1. Convert point cloud to DEM

A PDAL pipeline using writers.gdal converts the point cloud to a raster DEM (raw_dem.tif) at the specified resolution.

2. Apply color palette

gdaldem color-relief raw_dem.tif palette.cpt colored_dem.tif

The palette file maps elevation values to colors, producing an RGB raster.

3. Generate hillshade

gdaldem hillshade raw_dem.tif hillshade_dem.tif

Creates a shaded-relief raster that reveals terrain texture.

4. Blend color and hillshade

The colored DEM and hillshade are blended using a soft-light style operation via gdal_calc.py, producing combined_dem.tif. This creates visually richer terrain colorization compared to flat palette application.

5. Drape raster onto point cloud

A PDAL pipeline using filters.colorization samples the combined raster at each point's XY location and writes Red, Green, and Blue attributes into the output LAS.


Recipe usage

json
{
  "id": "colorize",
  "type": "COLORIZE_AS_DEM",
  "inputs":  { "input_las": "job:input_las" },
  "outputs": { "output_las": "step:colorize.output_las" },
  "param_keys": ["pallete", "resolution"]
}

Job params:

json
"params": {
  "colorize": {
    "pallete": "bathymetry",
    "resolution": 0.5
  }
}

Common pipeline pattern

json
LAS → COLORIZE_AS_DEM → BUILD_POTREE
LAS → COLORIZE_AS_DEM → BUILD_EPT
LAS → COLORIZE_AS_DEM → BUILD_COPC

Adding colorization before any of the tiling steps produces richer visualizations in web viewers that can render point colors.


  • COLORIZE_FROM_TIF — uses an external raster as the color source instead of deriving from elevation