build-contours
Optionally reprojects a LAS/LAZ point cloud, then extracts elevation contour lines and packages them as web-ready vector tiles. BUILD_CONTOURS rasterizes the cloud into a DSM, smooths it to suppress noise, runs gdal_contour to extract isolines, classifies them as major/minor, applies Chaikin corner-cutting for smooth curves, and exports to both MBTiles and PMTiles v3 — each containing a contours layer with elev and type (major/minor) attributes. DATASET_INFO runs in parallel to capture point cloud statistics. Fires a webhook on completion.
Recipe name: build-contoursVersion: 2.0.0Ordo ID: 43Reprojection: Optional (passthrough when source_epsg equals target_epsg or either is absent) Output formats: MBTiles (vector), PMTiles v3 (vector)
Steps
| Step | Type | Runs |
|---|---|---|
reproject | REPROJECT_LAS | First |
build_contours | BUILD_CONTOURS | After reproject |
dataset_info | DATASET_INFO | Parallel with build_contours (both after reproject) |
call_webhook | CALL_WEBHOOK | on_exit |
Recipe (v2.0.0 snapshot)
json
{
"name": "build-contours",
"version": "2.0.0",
"definition": {
"recipe": [
{
"id": "reproject",
"type": "REPROJECT_LAS",
"inputs": { "input_las": "job:input_las" },
"outputs": { "output_las": "step:reproject.output_las" },
"param_keys": ["source_epsg", "target_epsg"]
},
{
"id": "build_contours",
"type": "BUILD_CONTOURS",
"inputs": { "input_las": "step:reproject.output_las" },
"outputs": {
"contours_mbtiles": "step:build_contours.contours_mbtiles",
"contours_pmtiles": "step:build_contours.contours_pmtiles"
},
"param_keys": ["resolution", "output_type", "smoothing_factor", "contour_interval", "major_interval_multiplier", "simplify_tolerance", "chaikin_iterations"]
},
{
"id": "dataset_info",
"type": "DATASET_INFO",
"inputs": { "input_las": "step:reproject.output_las" },
"outputs": { "metadata": "step:dataset_info.metadata" }
}
],
"on_exit": {
"id": "call_webhook",
"type": "CALL_WEBHOOK",
"inputs": { "waits_for": "step:dataset_info.metadata" },
"param_keys": ["webhook_url"]
}
}
}Submitting a job
bash
curl -X POST https://dev.mapprism.com/ordo/jobs \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"recipe_id": 43,
"inputs": {
"job:input_las": {
"type": "las",
"uri": "development/survey/dataset.las",
"hash": "abc123"
}
},
"params": {
"reproject": {
"source_epsg": "EPSG:2271",
"target_epsg": "EPSG:3857"
},
"build_contours": {
"resolution": 1,
"output_type": "mean",
"smoothing_factor": 5,
"contour_interval": 5,
"major_interval_multiplier": 5,
"simplify_tolerance": 1,
"chaikin_iterations": 3
},
"call_webhook": {
"webhook_url": "https://myapp.example.com/hooks/done"
}
},
"outputs": {
"step:build_contours.contours_mbtiles": {
"path": "development/results/survey/contours.mbtiles"
},
"step:build_contours.contours_pmtiles": {
"path": "development/results/survey/contours.pmtiles"
},
"step:dataset_info.metadata": {
"path": "development/results/survey/metadata.json"
}
}
}'Poll for status:
bash
curl https://dev.mapprism.com/ordo/jobs/<job_id> \
-H "Authorization: Bearer <API_TOKEN>"Units note:
BUILD_CONTOURSdefaults are tuned for US survey feet (contour_interval: 5,resolution: 1). Adjust these values for metric datasets.
Required inputs
| Artifact key | Type | Description |
|---|---|---|
job:input_las | las | Source LAS/LAZ point cloud |
Required params
| Step | Param | Default | Description |
|---|---|---|---|
reproject | source_epsg | — | Source CRS (e.g. "EPSG:2271") |
reproject | target_epsg | — | Target CRS (e.g. "EPSG:3857") |
build_contours | resolution | 1 | DSM raster cell size in CRS units |
build_contours | output_type | "mean" | DSM height aggregation per cell: mean, min, max, idw, count, stdev, all |
build_contours | smoothing_factor | 5 | DSM downsampled to resolution × smoothing_factor before contouring — higher values produce smoother contours |
build_contours | contour_interval | 5 | Elevation interval between contour lines in CRS units |
build_contours | major_interval_multiplier | 5 | Every Nth contour is classified as major |
build_contours | simplify_tolerance | 1 | ogr2ogr -simplify tolerance in CRS units |
build_contours | chaikin_iterations | 3 | Number of Chaikin corner-cutting passes |
call_webhook | webhook_url | — | URL to POST the job result to |
See BUILD_CONTOURS for full parameter details.
Producible outputs
| Artifact | Type | Description |
|---|---|---|
step:build_contours.contours_mbtiles | mbtiles | Vector tile package (MBTiles) — contours layer with elev and type |
step:build_contours.contours_pmtiles | pmtiles | Vector tile package (PMTiles v3) — contours layer with elev and type |
step:dataset_info.metadata | json | PDAL metadata report |