Converting Point Clouds to Surface Models Using the PointCloudLASClassifier

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

Introduction

When point cloud data is collected, a variety of components are assigned to each individual point include coordinates, intensity, and classification. When creating surface models it is helpful to use point classification to quickly and easily identify ground points to extract the surface model from. In the examples below, we will demonstrate how a custom transformer called the PointCloudLASClassifier created by a Safe Software team member can be used within a workflow to create a DEM or TIN model.

The custom transformer PointCloudLASClassifier can be used to increase the accuracy of a DEM or TIN output by extracting just the ground points. If the point cloud data that you are working with does not have a classification component, then using shapefiles to remove non-ground points, like buildings, can be used. The Converting Point Clouds to Surface Models without Classification article explains how this can be done.

 

Examples

1. Splitting by Class to Make a DEM

To generate correct elevations along point cloud edges, all adjacent point cloud tiles must be taken into account. However, generating a single digital elevation model (DEM) for the center tile and all adjacent tiles can significantly affect performance. To reduce the overall volume of data, we can generate a relatively small buffer around the central point cloud tile and clip the edges of the adjacent tiles with this buffer. The resulting point cloud (the center tile with the edges of adjacent tiles) will be used for making a DEM raster, and then the raster can be clipped to the original extents of the center tile.

a.pc-tile.png b. dem-ground.png
Image a. shows the original point cloud data with the central tile of interest selected.
Image b. is the resulting DEM output from the LAS to DEM workflow below.

 

DEMs are commonly used models to represent the surface of the earth. They are raster-based models with cell values representing different levels of elevation. Due to each cell being an average representation of the elevation of a surface area, natural landscapes appear smooth, while man-made landscapes appear rough. Creating a DEM from LAS data is quick and simple with FME because you have the ability to use only ground classified points to create your model.

The points within a point cloud have a component called classification. The value of the code within the component represents class like buildings or ground. For creating a DEM we only need the ground class. The steps for creating a DEM from a point cloud are as follows:

1. Add a LAS reader to add the point cloud files to the workspace. Select all necessary files from the file browser for the reader dataset.

2. Separate the central tile from the adjacent tiles using the Tester by setting the Test Clause for the fme_basename as being equal to the central tile file name.

tester.jpg

3. Connect the “Passed” points (the central tile) to a Bufferer. In our case, we will use a buffer amount of 200 meters.

4. Using the Clipper, attach the buffered point cloud as the “Clipper” and the “failed” points from the Tester (the adjacent point cloud tiles) as the “Clippee”. This will result in a collection of points from the adjacent tiles that are 200 meters away from the border of the center tile edges.

5. Using the PointCloudSplitter with inputs of both the “Passed” points from the Tester (central tile) and “Inside” points from the Clipper (points from adjacent tiles), split the point cloud by classification. Ensure that the "Output Attribute" is set as "_classification". This is necessary for the custom transformer in the next step to be able to understand the data.

6. The custom transformer PointCloudLASClassifier can now be used by connecting the “Split” points from the PointCloudSplitter to the input port “LAS_Point_Cloud”. This custom transformer will identify the points with a classification of 2 (ground).

7. Connect the “Ground” points to “Points/Lines” in the RasterDEMGenerator to create a DEM. Set the parameters so that Surface Tolerance is set to 0.0 and the Output DEM X and Y Cell Spacing are both set to 2.

8. With another Clipper transformer, connected the “Passed” tester points (center tile) as the “Clipper” and the “DEMRaster” as the “Clippee”

9. Add a USGS_DEM Writer and connect the second Clipper’s Inside output port to it to get the final DEM. Set the coordinate system to “UTM83-16”. Change the DEM File Definition to “Manual” to be able to set the file name.

Optional: Try running the workspace without the link from the PointCloudLASClassifier transformer to the RasterDEMGenerator and instead connect the “Split” points from the PointCloudSplitter. Compare the different output DEMs.
a. dem-allpoints.pngb.dem-ground.png
Image a. shows the what the DEM output looks like when all points are used in the workflow to create a DEM.
Image b. Is what the DEM looks like when only the ground classified points are used. Using only the ground classified points creates a much smoother and realistic representation of the ground itself.

If using other LAS files to generate a DEM, check to see if the points come with classification. If so, make sure that only appropriate classes are used for DEM generation.

 

2. Splitting by Class to Make a TIN

The best results for creating a surface model with buildings can be achieved when a point cloud has a classification component. We can use the Data Inspector or PointCloudPropertyExtractor to check whether this component exists. If the point cloud has a classification of 2, the ground, it is often enough for generating surface. However, excluding buildings can still help to make a more precise model as it can help avoid classification errors. The PointCloudSplitter: Splitting Point Clouds by Components article explains more about splitting points cloud by class. The steps for this workspace are as follows:

1. Add an Esri Shapefile reader for the building footprint file and a LAS reader for the LAS file.

2. Connect the building footprint file to a Bufferer with a buffer amount of 5.

3. Use the Dissolver with default parameters on the buffered shapefile.

4. Connect the LAS file to the PointCloudSplitter and split by “Last Return Only” (change this in the parameters).

5. Add the Clipper transformer and connect the dissolved shapefile to “Clipper” and the split point cloud to “Clippee”. 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. Connect the “Outside” output from the Clipper to a PointCloudSplitter. Change the parameters to split the point cloud by classification.

7. Add the custom transformer PointCloudLASClassifier and connect the “Split” points to the “LAS_Point_Cloud” input port.

8. Add the SurfaceModeller transformer with a “Surface Tolerance” of 1 and connect the points from the output port “2-Ground” to the input port “Points/Lines”.

9. Add a RasterInterpretationCoercer and connect the output “DEMRaster” from the SurfaceModeller to it. The “Interpretation” parameter of this transformer should have the “Destination Interpretation Type” set to RGB24.

10. Add a Scaler and connect the output port “TINSurface” to it. The Scaler parameters should be X:1, Y:1, Z:3.
scaler-param.jpg

11. Add the AppearanceSetter transformer and connect “Output” from the RasterInterpretationCoercer to “Appearance” and “Scaled” from the Scaler to “Geometry”. The AppearanceSetter parameters should have “Set Appearance On” as “Front Side” and “Texture Mapping Type” set to “From Top View”

appearancesetter-param.jpg

12. From the “Output” port you can add a writer to write your TIN (we wrote it as a 3D PDF)

The output from this workspace is much smoother. Note that the bridges have disappeared from the model. This means that they have some other classification rather than ground:

tin2d.png

This workspace generates a TIN (as a 3D PDF file) using a DEM as a texture:

tin3d.png

 

Data Attribution

The data used here originates from data made available by the Ohio Geographically Referenced Information Program . The GIS Support Center maintains enterprise and site licenses for commercial data sets that are supportive of the Ohio Enterprise.

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.