Skip to content

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

TypeBUILD_COLORED_HILLSHADE_DSM
Acceptsinput_las: las
Producescolored_hillshade_dsm: tif
Paramspallete†, resolution†, output_type†, z_factor

† optional — executor defaults apply if omitted.


Inputs

SlotTypeDescription
input_laslasSource point cloud dataset

Outputs

SlotTypeDescription
colored_hillshade_dsmtifRGB colored shaded-relief GeoTIFF (LZW-compressed, tiled)

Parameters

All parameters are optional. Omitting them applies the defaults shown below.

NameTypeDefaultDescription
palletestringexecutor defaultPath to a .cpt palette file under mapprism/palletes/ in MinIO (e.g. "jjg/cbac/div/cbacspectral03.cpt")
resolutionnumber1Raster cell size in CRS units (e.g. 1 → 1 m/px for metric CRS)
output_typestring"max"Height aggregation per cell: max, min, mean, idw, count, stdev, or all
z_factornumber1Vertical 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

  1. Downloads the input LAS and the palette file from MinIO
  2. Builds a PDAL pipeline using readers.laswriters.gdal with the configured resolution and output_type, writing raw_dsm.tif; stamps nodata with gdal_edit.py -a_nodata -9999
  3. Rescales the .cpt palette to the DSM's actual elevation range (same logic as BUILD_COLORED_DSM), then runs gdaldem color-relief raw_dsm.tif pallete.cpt.scaled colored_dsm.tif -alpha
  4. Runs gdaldem hillshade raw_dsm.tif hillshade_dsm.tif -z {z_factor} -az 315 -alt 45 (fixed cartographic azimuth/altitude)
  5. Blends the two rasters: for each of the R, G, B channels, gdal_calc.py computes A*(B/255.0) where A is the color channel and B is the hillshade intensity — producing blend_r.tif, blend_g.tif, blend_b.tif
  6. Merges the three channel files with gdal_merge.py -separate into colored_hillshade_dsm.tif (LZW-compressed, tiled)
  7. Runs gdalinfo -stats on the output to capture raster metadata into the artifact record
  8. Uploads colored_hillshade_dsm.tif to 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.tif

  • BUILD_HILLSHADE_DSM — produces only the hillshade raster (no color)
  • BUILD_COLORED_DSM — produces only the color-relief raster (no hillshade blending)