How to Convert Point Clouds to Surface Models

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2022.1


Using a LAS dataset to create a DEM or TIN elevation model is useful since the model will be based on a large variety of point coordinates. Using the building footprints as a clipper, we can remove the unwanted returned building points for the surface model. This is a quick and easy way to create an accurate ground surface model, especially if the point cloud data you are working with has inaccurate classification values or does not have a classification component at all.
If the point cloud data that you are working with does have a classification component, consider using the PointCloudLASClassifier custom transformer instead of a building shapefile, as seen in the examples in this article.
You can create the workspace on your own or follow along with the completed workspace, which can be downloaded from the Files section on this article. 


Step-by-step Instructions

Part 1: LAS to DEM Without Buildings

This workflow removes the points that are within the building footprints so that they are not used in the surface modeling. Often the building footprints of the shapefile do not align perfectly with the point cloud buildings. To overcome this issue, the shapefiles are buffered before using them as clippers. 


1. Open FME Workbench

Open FME Workbench and click New to create a new workspace.


2. Add the data

Add an Esri Shapefile reader to the canvas for the building footprint shapefile file (s1590705) and a LAS reader to the canvas for the LAS file (s1590705).


3. Bufferer & Dissolver for Building Footprint

Connect the building footprint file to a Bufferer with a buffer amount of 5 ground units. Use the Dissolver with default parameters on the buffered shapefile.


4. PointCloudSplitter for LAS File

Connect the LAS reader feature type to a PointCloudSplitter and split by “Last Return Only”.


5. Clip the Buildings from the Point Cloud

Add the Clipper transformer and connect the Dissolver Area output port to the Clipper input port. Then connect the split point cloud to “Candidate”. This will remove the points within the point cloud that fall within the building footprints so that they will not be included in the DEM generation.


6. Create DEM with SurfaceModeller

Use the SurfaceModeller to create a DEM by connecting the “Outside” Clipper output to “Points/Lines”. Set the “Surface Tolerance” to 0 and the “Output Contour Interval” to 100.


7. Write the Output

From the “DEMRaster” output add a USGS DEM Writer with default parameters to write the DEM as its own file. Run the workspace to view the results.


The images below show the clipper output and final DEM. The output from this workspace has a lot of noise and is not very smooth. This is likely from vegetation and other features surroundings the buildings.

clip-notiles.jpg notile-dem.jpg


Part 2: Tiling for Performance

The nature of different data sources can lead to noticeable differences in performance. If the clippers (building footprints) are numerous and they are spread all over the point cloud like we have, then the translation time may be slower than in cases with few clippers or when clippers are localized in a certain area.
Tiling a point cloud before a clipping operation can significantly improve performance. Adding a Tiler to the workspace above will process the data faster. 


1. Keep the Part 1 Workspace

Keep all of the same configurations and transformers in place, or simply move to the second bookmark in the provided workspace to follow along. 


2. Add a Tiler

Add a  Tiler  between the LAS reader feature type and the PointCloudSplitter. In the parameters set  “Tiling Type” to “Number of Tiles”, “Number of Horizontal Tiles” to 2 and “Number of Vertical Tiles” to 3. 



The runtime before adding the Tiler is 22.6 seconds. (CPU: 19.7s user, 2.3s system) and after adding the Tiler the runtime is now 19.0 Seconds. (CPU: 17.1s user, 1.1s system).
The images below show the clipper output and final DEM, both after using the Tiler transformer. The output from this workspace is smoother than the previous output, especially near the bottom where there are many buildings.

clip-tiling.jpg tile-dem.jpg


Part 3: 3D PDF from DEM Texture & LAS File

With performance improved, this part will go over how to create a PDF 3D with a TIN surface and DEM texture from a LAS file. 


1. Keep the Part 2 Workspace

Keep all of the same configurations and transformers in place, or simply move to the third bookmark in the provided workspace to follow along. 


2. Connect the Clipper to a PointCloudSplitter

Continuing in the workspace from Part 2, connect a PointCloudSplitter to the Clipper Outside port. Split by classification and set the split type to Unique. 


3. Split by Classification, Keeping the Ground

Add a PointCloudLASClassifier custom transformer to the canvas and connect it to the PointCloudSplitter. Set the Source Attribute to the Classification attribute. This custom transformer will make separate output ports for each classification. 


4. Make a DEM and TIN Surface

Add a SurfaceModeller to the canvas and connect it to the “2-Ground” output port of the PointCloudLASClassifier. Set the parameters as follows:

  • Surface Tolerance: 1
  • Interpolation Method: Auto
  • Output DEM x Cell Spacing: 5
  • Output DEM y Cell Spacing: 5
  • Output DEM Raster Nodata Value -32767
  • Drape Method: Vertex
  • Existing Elevation: Replace Z
  • Output Contour Interval: 100
  • Output Contour Dimension: 3
  • Conflict Resolution: Perturb Input Points On Contour Interval


5. Scale Along Z for better Visibility

Add a Scaler on the canvas and connect it to the TINSurface output port of the SurfaceModeller. Change the general parameters to:

  • X Scale Factor: 1
  • Y Scale Factor: 1
  • Z Scale Factor: 3
  • Scale Origin: 0,0


6. Coerce the Raster DEM 

Add a RasterInterpretationCoercer to the canvas and connect it to the DEMRaster output port of the SurfaceModeller. Change the parameters as follows:

  • Destination Interpretation Type: RGB24
  • RGBA to RGB: Drop the alpha band
  • Convert from Color to Color: Scale by Data Type
  • Convert from Numeric to Color: Scale by Data Values
  • Convert from Float to Integer: Round



7. Add a Texture to the Surface

Add an AppearanceSetter to the canvas. Connect the output port of the RasterInterpretationCoercer to the Appearance input port, and the output port of the Scaler to the Geometry input port. 

Click on the ellipsis for the Geometry XQuery parameter to open the editor. In the Geometry XQuery editor, select This part for Part to Test, Hierarchy Position for Left Value, Is for Operator, and Root Node for Right Value, then click OK.


Back in the AppearanceSetter parameters, change the Set Appearance On to Front Side, Appearance Storage to Create New Definitions, and Texture Mapping Type to From Top View. Leave the rest of the parameters as default. 


8. Write the Output to a 3D PDF

Add an Adobe 3D PDF writer to the canvas and connect it to the output port of the AppearanceSetter. Choose your file path and run the workspace to see the result!



Part 4: Creating a Textured TIN

Triangulated irregular networks (TINs) are complex and vector-based models. However, they are more realistic representations of a surface because each node of the triangle represents an exact elevation point rather than an averaged one like with DEMs. Creating a complex model like a city from LAS data only requires one tool called the TINGenerator transformer in FME. We can get some interesting 3D results with realistic colors by generating a TIN from a point cloud with an ortho texture on it. This is a very simple process:


1. Creating TIN from LAS

Using the same data as before, create a new workspace or go to the last bookmark. Connect a TINGenerator to the LAS reader feature type to create the TIN Geometry. Set the “Surface Tolerance” parameter to 5.


2. Set the Appearance

Add the GeoTIFF to the canvas. Connect the GeoTIFF reader feature type to a AppearanceSetter transformer. Connect the GeoTIFF as “Appearance” and “TINSurface” from the TINGenerator to “Geometry” of the AppearanceSetter. Under the parameters, set “Set Appearance On” to “Front Side” and “Texture Mapping Type” to “From Top View”.



3. Write the Output

The “Geometry” output of the AppearanceSetter will display the textured TIN. An Adobe 3D PDF writer can be used with default parameters to save the TIN as its own file for viewing.


This process was a quick way to make an interesting 3D city model:


The quality of the model depends on the surface tolerance parameter in TINGenerator. For more information view the documentation.


Data Attribution

Was this article helpful?



Please sign in to leave a comment.