Skip to content

BUILD_HILLSHADE_DSM

Generates a hillshade GeoTIFF from a LAS/LAZ point cloud by first rasterizing the points into a Digital Surface Model (DSM) and then applying GDAL's hillshade algorithm. The output is a single-band GeoTIFF with shaded-relief intensity values (0–255).

The rasterization uses PDAL's writers.gdal to aggregate point heights at a configurable resolution. The hillshade is computed with fixed cartographic defaults — azimuth 315° (north-west sun), altitude 45° — producing a standard terrain illumination effect. Nodata cells are marked as -9999.

Typical use: generating 2D terrain visualization layers from airborne LiDAR or MBES point clouds for web mapping, reporting, or QA overlays.


Contract

TypeBUILD_HILLSHADE_DSM
Acceptsinput_las: las
Produceshillshade_dsm: tif
Paramsresolution (opt), output_type (opt), z_factor (opt)

Inputs

SlotTypeDescription
input_laslasSource point cloud dataset

Outputs

SlotTypeDescription
hillshade_dsmtifSingle-band hillshade GeoTIFF

Parameters

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

NameTypeDefaultDescription
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 for the hillshade. Values > 1 emphasize relief

What it does internally

  1. Downloads the input LAS 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. Runs gdaldem hillshade with z_factor, azimuth=315, altitude=45 — producing hillshade_dsm.tif
  5. Runs gdalinfo -stats on the output to capture raster metadata into the artifact record
  6. Uploads hillshade_dsm.tif to MinIO and returns the artifact

Recipe usage

json
{
  "id": "build_hillshade_dsm",
  "type": "BUILD_HILLSHADE_DSM",
  "inputs":  { "input_las": "job:input_las" },
  "outputs": { "hillshade_dsm": "step:build_hillshade_dsm.hillshade_dsm" }
}

With explicit params (all optional):

json
"params": {
  "build_hillshade_dsm": {
    "resolution": 1,
    "output_type": "max",
    "z_factor": 1
  }
}

Artifact storage path

text
artifacts/job_{id}/build_hillshade_dsm/hillshade_dsm.tif

  • COLORIZE_AS_DEM — also derives a DEM from points, but produces a colorized point cloud rather than a 2D raster