Subscribe to this thread
Home - General / All posts - Creating a Canopy Height Model
jwickers2 post(s)
#18-Jul-25 07:42

Hi

I'm new to manifold. I have about 700 laz files that I want to decompress and then create a canopy height model (from DSM and DTM). What is the process for this?

Thank you.

Jane

Dimitri


7,621 post(s)
#19-Jul-25 05:42

That's a big topic. I was feeling lazy today so I decided to ask DeepSeek (https://chat.deepseek.com ). DS is a lot faster to respond than either ChatGPT 4.5 or specialty Open AI models like o3-pro. So I asked DS the following, not enabling DeepThink mode (which usually takes longer):

When working with LAS/LAZ LiDAR files, if somebody wants to create DSM or DTM rasters from those files, what are they talking about?

Following is DS's response. The response has pretty formatting... not sure if I can just copy/paste here and retain that formatting. But you can ask DS the same prompt and presumably you'll get something similar:

When working with LAS/LAZ (LiDAR point cloud data), creating DSM (Digital Surface Model) and DTM (Digital Terrain Model) rasters involves processing the raw point cloud to generate elevation grids representing different aspects of the terrain. Here’s a breakdown of what these terms mean and how they’re derived:


1. Key Definitions

TermFull NameDescriptionWhat It RepresentsDSMDigital Surface ModelElevation model including all surface features (buildings, trees, vehicles).Top of all objects + ground.DTMDigital Terrain ModelElevation model of the bare ground (no vegetation, structures)."Bare earth" topography.DEMDigital Elevation ModelGeneric term for elevation data (sometimes used interchangeably with DTM).Can mean DSM or DTM depending on context.


2. How They’re Created from LAS/LAZ FilesStep 1: Classify Points (If Not Already Done)

LiDAR points are typically pre-classified (e.g., ground, vegetation, buildings). If not, use tools like:

  • LAStools (

    lasground

    for ground classification)

  • PDAL (Point Data Abstraction Library)

  • CloudCompare (manual classification).

Step 2: Filter Points
  • For DSM: Use all returns (ground + non-ground: classes 1–20).

  • For DTM: Use only ground points (class 2).

Step 3: Rasterize Points

Convert filtered points to a grid (raster) using interpolation:

  • Common Methods:

    • Bin averaging (assign cell value = average elevation of points in the bin).

    • Triangulation (TIN) → Rasterize triangles.

    • Inverse Distance Weighting (IDW) or Kriging (for smoother surfaces).

Step 4: Output Raster Formats
  • GeoTIFF (most common)

  • ASCII Grid (text-based)

  • IMGs (ERDAS).


3. Tools to Generate DSM/DTM

ToolCommand/WorkflowNotesLAStools

las2dem -i input.laz -o dsm.tif

(DSM)

las2dem -keep_class 2 -i input.laz -o dtm.tif

(DTM)Fast, commercial (free for small jobs).PDAL

pdal pipeline dem.json

(JSON pipeline with

writers.gdal

for raster output)Open-source, flexible.QGIS + LAStoolsUse "LAS to Raster" tool in QGIS (via Processing toolbox).GUI-friendly.ArcGIS Pro"LAS Dataset to Raster" tool (set Class = 2 for DTM).Commercial, integrates with Esri workflows.


4. Visual Comparison

ModelIncludesTypical Use CaseDSMTrees, buildings, power linesUrban planning, flood modeling (with structures).DTMOnly groundHydrology, geological analysis, contour generation.

https://www.researchgate.net/profile/Joao-Pedro-Silva-5/publication/334453982/figure/fig1/AS:781826843836416@1563984964622/Digital-Terrain-Model-DTM-and-Digital-Surface-Model-DSM.png


5. Pitfalls to Avoid
  • DSM Artifacts: Noise from cars/people → filter low outliers.

  • DTM Errors: Misclassified ground points → manually clean classes.

  • Resolution: Choose cell size wisely (e.g., 1m for urban areas, 5m for forests).


6. Example PDAL Pipeline for DTM

json

Copy

Download

{ "pipeline": [ "input.laz", { "type": "filters.range", "limits": "Classification[2:2]" }, { "type": "writers.gdal", "resolution": 1.0, "output_type": "min", // or "max", "mean", "idw" "filename": "dtm.tif" } ] }


Key Takeaways
  1. DSM = Surface + Objects (raw reality).

  2. DTM = Ground only (remove vegetation/buildings).

  3. Start with classified LAS/LAZ (or classify first).

  4. Use binning/TIN interpolation for rasterization.

Would you like a step-by-step tutorial for a specific tool (e.g., QGIS or LAStools)?

Dimitri


7,621 post(s)
#19-Jul-25 05:42

Next, I asked DS:

I use Manifold Release 9 GIS, which has extensive ability to pull data from LAS/LAZ points and create rasters using various interpolation techniques. The user manual is here: https://manifold.net/doc/mfd9/index.htm# ... how would I use Manifold to do that?

Here's what DS replied:

In Manifold Release 9, you can create DSM (Digital Surface Model) and DTM (Digital Terrain Model) rasters from LAS/LAZ LiDAR data using its built-in point cloud and raster interpolation tools. Here’s a step-by-step guide:


Step 1: Import LAS/LAZ Data

  1. Open Manifold and go to File > Import > Point Cloud.

  2. Select your

    .las

    or

    .laz

    file.

  3. Manifold will auto-convert the LiDAR data into a drawing (vector points) and a table (attributes like elevation, classification).


Step 2: Filter Points (For DTM)

To create a DTM, you’ll need to isolate ground points (Class 2):

  1. Open the table associated with the imported LiDAR data.

  2. Click Transform > Filter and use a query like:

    sql

    Copy

    Download

    WHERE [Classification] = 2 -- Ground points only

  3. Save the filtered set as a new component (e.g.,

    Ground_Points

    ).


Step 3: Create a Raster from PointsOption A: Quick DSM (All Points)
  1. Right-click the original LiDAR drawing (unfiltered) and select Create > Surface.

  2. In the Surface dialog:

    • Method: Choose interpolation (e.g., Triangulation, Kriging, or Inverse Distance Weighting).

    • Z Value: Select the elevation field (e.g.,

      Z

      ).

    • Cell Size: Set resolution (e.g., 1 meter for urban areas).

  3. Click Create to generate the DSM raster.

Option B: DTM (Ground Points Only)
  1. Right-click the filtered ground points drawing and select Create > Surface.

  2. Follow the same steps as above, but use only the ground-classified points.

  3. Adjust interpolation settings for smoother terrain.


Step 4: Adjust Raster Properties
  1. Open the raster component (DSM/DTM).

  2. Right-click and choose Properties to:

    • Set a color gradient (e.g., elevation-based).

    • Adjust transparency or hillshading (for visualization).


Step 5: Export (Optional)
  1. Right-click the raster and select Export.

  2. Choose GeoTIFF or ASCII Grid for use in other GIS tools.


Key Manifold Features for LiDAR
  • Interpolation Methods:

    • Triangulation (TIN): Fast, accurate for DTMs.

    • Kriging: Best for noisy data.

    • Inverse Distance Weighting (IDW): Smooths gaps.

  • Classification Tools: Use SQL queries to filter classes (e.g.,

    WHERE [Classification] IN (2, 8)

    for ground + buildings).

  • Batch Processing: Automate workflows with Scripts (see Manifold’s SQL/API docs).


Example: SQL for Custom Filtering

sql

Copy

Download

-- Create a DTM from ground points only CREATE TABLE Ground_Points AS SELECT * FROM [LiDAR_Table] WHERE [Classification] = 2; -- Generate a DSM from all points CREATE SURFACE DSM FROM [LiDAR_Drawing] METHOD 'Triangulation' ZFIELD 'Z' CELLSIZE 1.0;


Troubleshooting
  • Missing Classes: Verify LAS/LAZ files include classification (use View > Schema).

  • Gaps in DTM: Increase search radius in interpolation settings.

  • Performance: For large datasets, use File > Database > Optimize.


Manifold Manual References
  1. Point Cloud Import

  2. Surface Creation

  3. SQL Filtering

Would you like help with specific interpolation settings (e.g., tweaking Kriging parameters)?

... looking over the above it's close but not exactly correct, in terms of precise SQL and such. But not bad for a free tool that responded in a few seconds. I suppose DeepThink mode would be better. I've noticed the best models from Open AI and also DeepSeek are getting better, but still, they have a truly superb ability to provide commentary that is very believable while being incorrect. So, use as a guide for your own explorations.

In 9 you can try all that out in Viewer. You just have to load the data each time you fire it up, but then everything is the same right up to when you write the GeoTIFF or whatever you're using for an output format.

jsperr
154 post(s)
#20-Jul-25 05:03

Thank you Dimitri. I've been pondering how to get started with using AI to help me with Manifold and you have generously provided a thorough learning path I can explore.

Sloots supplies a wealth of information also, and I miss Adam's regular postings helping users navigate their problems.

Thanks to everyone who contributes here in ways large or small -- my brain needs these challenges in my advancing age.

jwickers2 post(s)
#22-Jul-25 01:22

That's really helpful. Thank you.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.