Skip to content

BUILD_COLORED_DSM

Generates a color-relief GeoTIFF from a LAS/LAZ point cloud by rasterizing the points into a Digital Surface Model (DSM) and applying a .cpt color palette. The output is an RGBA GeoTIFF where each pixel's color corresponds to its elevation within the dataset.

The palette is automatically rescaled to match the DSM's actual elevation range before it is applied, so any .cpt file works correctly regardless of its original value domain. Color palettes are stored server-side in MinIO and referenced by name.

Typical use: generating 2D elevation color maps from LiDAR or MBES point clouds for web mapping, reporting, or QA overlays.


Contract

TypeBUILD_COLORED_DSM
Acceptsinput_las: las
Producescolored_dsm_tif: tif
Paramspallete†, resolution†, output_type

† optional — executor defaults apply if omitted.


Inputs

SlotTypeDescription
input_laslasSource point cloud dataset

Outputs

SlotTypeDescription
colored_dsm_tiftifRGBA color-relief GeoTIFF

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

Note: pallete is intentionally spelled with one t — this matches the param name in the database (same convention as COLORIZE_AS_DEM).


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
  3. Runs gdal_edit.py -a_nodata -9999 to stamp the nodata value on the raw DSM
  4. Extracts the DSM's actual min/max elevation via gdalinfo -mm and the palette's original value range from the .cpt file, then rescales all palette entries to the DSM range — producing pallete.cpt.scaled
  5. Runs gdaldem color-relief raw_dsm.tif pallete.cpt.scaled colored_dsm.tif -alpha to produce the RGBA output
  6. Runs gdalinfo -stats on the output to capture raster metadata into the artifact record
  7. Uploads colored_dsm.tif to MinIO and returns the artifact

Recipe usage

json
{
  "id": "build_colored_dsm",
  "type": "BUILD_COLORED_DSM",
  "inputs":  { "input_las": "job:input_las" },
  "outputs": { "colored_dsm_tif": "step:build_colored_dsm.colored_dsm_tif" }
}

With explicit params (all optional):

json
"params": {
  "build_colored_dsm": {
    "pallete": "jjg/cbac/div/cbacspectral03.cpt",
    "resolution": 1,
    "output_type": "max"
  }
}

Artifact storage path

text
artifacts/job_{id}/build_colored_dsm/colored_dsm.tif

  • BUILD_HILLSHADE_DSM — produces a shaded-relief raster instead of a color-relief raster
  • COLORIZE_AS_DEM — applies the same palette approach but produces a colorized point cloud rather than a 2D raster