BUILD_COLORED_HILLSHADE_DSM
Generates a colored shaded-relief GeoTIFF from a LAS/LAZ point cloud. The input is rasterized into a Digital Surface Model (DSM), from which both a color-relief raster and a hillshade raster are derived. The two are then blended together per-channel using a multiply operation, producing a single output where terrain color and surface texture are combined.
The multiply blend darkens the color raster proportionally to the hillshade intensity — fully lit slopes retain their palette color, shadowed slopes darken toward black. This is the standard cartographic technique for colored shaded relief and produces richer terrain visualization than either color or hillshade alone.
Typical use: generating publication-quality 2D terrain maps from LiDAR or MBES point clouds for web mapping, reporting, or QA overlays.
Contract
| Type | BUILD_COLORED_HILLSHADE_DSM |
| Accepts | input_las: las |
| Produces | colored_hillshade_dsm: tif |
| Params | pallete†, resolution†, output_type†, z_factor† |
† optional — executor defaults apply if omitted.
Inputs
| Slot | Type | Description |
|---|---|---|
input_las | las | Source point cloud dataset |
Outputs
| Slot | Type | Description |
|---|---|---|
colored_hillshade_dsm | tif | RGB colored shaded-relief GeoTIFF (LZW-compressed, tiled) |
Parameters
All parameters are optional. Omitting them applies the defaults shown below.
| Name | Type | Default | Description |
|---|---|---|---|
pallete | string | executor default | Path to a .cpt palette file under mapprism/palletes/ in MinIO (e.g. "jjg/cbac/div/cbacspectral03.cpt") |
resolution | number | 1 | Raster cell size in CRS units (e.g. 1 → 1 m/px for metric CRS) |
output_type | string | "max" | Height aggregation per cell: max, min, mean, idw, count, stdev, or all |
z_factor | number | 1 | Vertical exaggeration applied to the hillshade. Values > 1 emphasize relief |
Note: pallete is intentionally spelled with one t — matches the param name in the database (same convention as COLORIZE_AS_DEM and BUILD_COLORED_DSM).
What it does internally
- Downloads the input LAS and the palette file from MinIO
- Builds a PDAL pipeline using
readers.las→writers.gdalwith the configuredresolutionandoutput_type, writingraw_dsm.tif; stamps nodata withgdal_edit.py -a_nodata -9999 - Rescales the
.cptpalette to the DSM's actual elevation range (same logic asBUILD_COLORED_DSM), then runsgdaldem color-relief raw_dsm.tif pallete.cpt.scaled colored_dsm.tif -alpha - Runs
gdaldem hillshade raw_dsm.tif hillshade_dsm.tif -z {z_factor} -az 315 -alt 45(fixed cartographic azimuth/altitude) - Blends the two rasters: for each of the R, G, B channels,
gdal_calc.pycomputesA*(B/255.0)where A is the color channel and B is the hillshade intensity — producingblend_r.tif,blend_g.tif,blend_b.tif - Merges the three channel files with
gdal_merge.py -separateintocolored_hillshade_dsm.tif(LZW-compressed, tiled) - Runs
gdalinfo -statson the output to capture raster metadata into the artifact record - Uploads
colored_hillshade_dsm.tifto MinIO and returns the artifact
Recipe usage
json
{
"id": "build_colored_hillshade_dsm",
"type": "BUILD_COLORED_HILLSHADE_DSM",
"inputs": { "input_las": "job:input_las" },
"outputs": { "colored_hillshade_dsm": "step:build_colored_hillshade_dsm.colored_hillshade_dsm" }
}With explicit params (all optional):
json
"params": {
"build_colored_hillshade_dsm": {
"pallete": "jjg/cbac/div/cbacspectral03.cpt",
"resolution": 1,
"output_type": "max",
"z_factor": 1
}
}Artifact storage path
text
artifacts/job_{id}/build_colored_hillshade_dsm/colored_hillshade_dsm.tifRelated executors
BUILD_HILLSHADE_DSM— produces only the hillshade raster (no color)BUILD_COLORED_DSM— produces only the color-relief raster (no hillshade blending)