Using the PointCloudFilter

Sydney Dombowsky
Sydney Dombowsky
  • Updated

Introduction

Point cloud datasets can contain a lot of information that isn’t required for what you are trying to achieve. To help filter out points of interest, we can use the PointCloudFilter transformer. The PointCloudFilter uses an expression to filter the points of interest, which will then reduce the output size when writing the data back out.

The source data and workspace can be downloaded from the files section.

 

Step-by-Step Instructions

Filtering point clouds on the z-axis is the most common application of filtering. Removing roofs off buildings, selecting only the ground, and setting elevation bands are all done with z filtering. Depending on the complexity of the filter, you can use a single filter or multiple filters within a single PointCloudFilter transformer to achieve your results.

 

Single Filter

To remove the roof of a building, we need to know the range of vertical extents of the ground and where the roof begins. This can be determined by opening up the dataset in the FME Data Inspector or Data Preview.

 

1. View in FME Data Inspector

In FME Data Inspector, click Open from the Toolbar and set the following parameters in the Select Dataset to View dialog:

  • Format: ASPRS Lidar Data Exchange Format (LAS)
  • Dataset: House.las
    • Click the ellipsis to browse to the unzipped downloaded folder and locate the file in the Data folder

Click OK to view the dataset.

 

2. Select Min and Max Extents

Ensure that the Record Information window is open and click on the lowest point you are interested in. To do this, use the tools in the top Toolbar to pan, orbit, select, and zoom to the point.

Once you’ve selected your lowest point, look for the value of the z component in the Record Information window and record the number. In this case, we will use -1.97.

Repeat with the upper extent. Click on the highest point you are interested in. You might need to zoom in a bit to accurately click on the points. Then record the value of the z component. In this case, we will use 2.44.

This range represents the vertical extent we wish to filter: -1.97 to 2.44.

 

3. Add Data in FME Workbench

Open a blank workspace in FME Workbench. Click the Reader button in the Toolbar and set the following parameters in the Add Reader dialog:

  • Format: ASPRS Lidar Data Exchange Format (LAS)
  • Dataset: /House.las
    • Browse to the downloaded file

Click OK to add the reader to the canvas.

 

4. Add a PointCloudFilter Transformer

Next, we will add a PointCloudFilter transformer filter for the z values we chose. Connect the LAS reader feature type to the PointCloudFilter Input port. Open the parameters and set the following:

Expression Output Port
@Component(z) > -1.97 && @Component(z) < 2.44 House

 

You can write or paste this expression into the field:

@Component(z) > -1.97 && @Component(z) < 2.44

Or you can open the Arithmetic Editor by clicking the ellipsis in the expression box. Under Point Cloud Components, double-click z to add @Component(z) to the expression box. Then, use the Math Operators to add >, &&, <, and then fill in the rest of the expression using the values we recorded from FME Data Inspector. 

When creating a range with the expression, use && instead of AND.

 

5. Run the Translation

Run the workspace with Feature Caching enabled. Once the translation is complete, click the green eye icon to inspect the cached data in Data Preview.

In the Data Preview window, we can see that the roof is filtered and we can see inside the building:

 

Multiple Filters

Using the PointCloudFilter with multiple filters and the FeatureColorSetter transformers, we can also divide the point cloud into sections and add coloring. 

For this example, we will divide a point cloud depicting an elevation model and divide it into five sections, then add color. 

Another method of doing this would be to use the PointCloudSplitter. For more information, see the article PointCloudSplitter: Splitting Point Clouds By Components.

 

1. View in FME Data Inspector

In FME Data Inspector, click Open from the Toolbar and set the following parameters in the Select Dataset to View dialog:

  • Format: ASPRS Lidar Data Exchange Format (LAS)
  • Dataset: Mountain.las
    • Click the ellipsis to browse to the unzipped downloaded folder and locate the file in the Data folder

Click OK to view the dataset.

 

We will now find the min and max extents for the area we want to color. To do this, use the Select tool and drag a box over the entire point cloud. In the Record Information window, you should see Min Extents and Max Extents. We are interested in the z extent, which will be the last value in each row.

The min z extent is 242.2 and the max z extent is 412.35.

 

2. Add Data in FME Workbench

Open a blank workspace in FME Workbench. Click the Reader button in the Toolbar and set the following parameters in the Add Reader dialog:

  • Format: ASPRS Lidar Data Exchange Format (LAS)
  • Dataset: /Mountain.las
    • Browse to the downloaded file

Click OK to add the reader to the canvas.

 

3. Add an ExpressionEvaluator

We will break the elevation into 5 equal parts. To do this, we will use an ExpressionEvaluator transformer to divide the difference between max and min values by 5.

Add an ExpressionEvaluator and connect the LAS reader feature type to the ExpressionEvaluator Input port.

In the ExpressionEvaluator parameters, set the following equation:

(412.35 - 242.2)/5

 

4. Add a PointCloudFilter

Now we have an attribute called _result that has the value of 34.03000000000001, which can be found by running the workspace and viewing the table in Data Preview. 

 

We will use this value in PointCloudFilter expressions to build a range of equal interval filters. Add a PointCloudFilter to the canvas and connect its Input port  to the ExpressionEvaluator Output port.

In the PointCloudFilter parameters, set the following expressions:

Expression Output Port
@Component(z) > 242.4 && @Component(z) < (242.2+@Value(_result))
1
@Component(z) > (242.4+@Value(_result)) && @Component(z) < (242.2+(@Value(_result)*2))
2
@Component(z) > (242.4+(@Value(_result)*2)) && @Component(z) < (242.2+(@Value(_result)*3))
3
@Component(z) > (242.4+(@Value(_result)*3)) && @Component(z) < (242.2+(@Value(_result)*4))
4
@Component(z) > (242.4+(@Value(_result)*4)) && @Component(z) < 412.35
5

These expressions define a range between the lowest value of z and the highest value of z in that range. Using the _result attribute, we can multiply it by however many times it would occur in that range.

By default, the PointCloudFilter will output unfiltered points. If you leave this set to Yes, there will be some unfiltered points that result from using whole numbers in the equation. Set Output Unfiltered Points to No to prevent any confusion in the next steps

  • Output Unfiltered Points: No

 

5. Add FeatureColorSetter Transformers

The final step is to color each of the ranges with a specific color. Add five FeatureColorSetter transformers to the canvas and connect each one to one of the five PointCloudFilter output ports:

In each of the FeatureColorSetter parameters, set the Color Scheme to Fixed:

  • Color Scheme: Fixed

Then set the Pen Color according to the following table:

PointCloudFilter: Output Port FeatureColorSetter: Pen Color
1
0.333333,0.666667,1
2
0.333333,0.666667,0
3
1,0.666667,0.498039
4
1,1,0
5
1,0,0

Once all the FeatureColorSetters are set up, add an Inspector transformer and connect it to all five FeatureColorSetter Colored output ports:

 

6. Run the Workspace

Run the workspace and view the result in FME Data Inspector or Visual Preview. There should be a point cloud with five different colors. Feel free to change the colors as desired.

 

Additional Resources

PointCloudFilter Transformation Documentation

FeatureColorSetter Transformer Documentation

Tutorial: Getting Started with Point Clouds

Removing Noise in Point Clouds

Thinning and Combining Point Clouds

PointCloudSplitter: Splitting Point Clouds By Components

 

Data Attribution

The data for the Single Filter exercise originates from SketchUp 3D Warehouse, owned by Trimble Inc. It contains content provided by Trimble Inc. and individual contributors, subject to the SketchUp 3D Warehouse Terms of Use. Copyright © 2026 Trimble Inc., all rights reserved.

The data for the Multiple Filter exercise originates from West Virginia View, a member of AmericaView and the USGS. It contains information provided by the West Virginia GIS Technical Center. Copyright © 2019 West Virginia GIS Technical Center, all rights reserved.

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.