PointCloudSplitter: Splitting Point Clouds by Components

Sydney Dombowsky
Sydney Dombowsky
  • Updated

Introduction

When point cloud datasets are collected, several component values are also recorded for each point. This can include information such as color, coordinates, elevation, intensity, and classification. Although point clouds contain a large amount of information, sometimes there is no need to keep it all. Processing large datasets to analyze a single type of feature within it is inefficient and time-consuming. The PointCloudSplitter transformer is useful for separating the features of interest in the point cloud from the rest of the points.

The examples below demonstrate how the PointCloudSplitter can be used in different scenarios. To learn more about the PointCloudSplitter, visit the documentation page.

The data and workspace templates used in this tutorial can be downloaded from the Files section.

 

Files

Due to the large file size of point clouds, the LiDAR data must be downloaded separately from the City of Vancouver's Open Data Portal. Optionally, you can copy and paste the HTTPS URL directly into the LAS reader.

 

Data:

LiDAR Point Cloud: https://safe-kc.s3.us-west-2.amazonaws.com/Thinning+and+Combining+Point+Clouds/COV_4900E_54570N.zip

GeoTIFF Orthophoto: https://safe-kc.s3.us-west-2.amazonaws.com/PointCloudSplitter%3A+Splitting+Point+Clouds+by+Components/Orthophoto.zip

 

Workspace Templates:

https://safe-kc.s3.us-west-2.amazonaws.com/PointCloudSplitter%3A+Splitting+Point+Clouds+by+Components/PointCloudSplitter.zip

 

Step-by-Step Instructions

Splitting by Return Number

When point cloud data is collected using LiDAR, laser pulses are emitted towards the ground and reflected back to the sensor. A single pulse can generate multiple returns if it encounters multiple surfaces along its path (such as vegetation layers). Each return is assigned a return number. The number of returns depends on the structure of the surfaces encountered, while the reflectivity of the surface influences the intensity value (strength) of each return.

With the PointCloudSplitter, there are four options for how to split a point cloud by return. We can split based on return, number_of_returns, First Return Only, or Last Return Only. The steps below demonstrate how to split point clouds by return.

1. Read 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:

Click OK to add the reader to the canvas.

 

2. Add a PointCloudSplitter 

Add a PointCloudSplitter transformer and connect its Input port to the LAS reader feature type. Double-click the PointCloudSplitter to open the parameters and set the following:

  • Split By: return
  • Split Type: Unique
  • Output Attribute: _returns

 

3. Add a TestFilter

A maximum of five returns will be collected by a sensor, so we will use a TestFilter transformer to filter by each return number. 

Connect the PointCloudSplitter Split output port to a TestFilter Input port and open the TestFilter parameters.

Double-click into the first Test definition box, next to If and a new dialog box will open. In the Test Conditions dialog, set the following clause:

  • Left Value: _returns
    • Click the drop-down arrow to select the attribute
  • Operator: =
  • Right Value: 1
  • Output Port: 1

Click OK. We are back to the original TestFilter parameters dialog. We will now add four more clauses to test for two, three, four, and five returns. 

For each new clause, double-click into the next empty Test condition box next to Else If.

Repeat the previous steps we took in the Test Conditions dialog, according to the following table:

Left Value Operator Right Value Output Port
_returns = 2 2
_returns = 3 3
_returns = 4 4
_returns = 5 5

Your list of Port Definitions should look like this:

 

4. Run Workspace and View Output

Run the workspace with data caching enabled and click on each green eye icon to inspect the TestFilter output ports individually in Data Preview.

 

Alternatively, we can write each output to a LAS file and view it as a 3D point cloud, rather than a flattened 2D point cloud. The images below show the output written to LAS files, viewed in FME Data Inspector.

The images below show the output written to LAS files, viewed in FME Data Inspector. The first image shows the point cloud with one return, the second with two returns, and so on.

 

Splitting by Classification

Splitting a point cloud by class can be useful if you are interested in one or many features. The classification values are assigned based on the ASPRS classification standards.

Since this type of operation is common, a Safe Software employee created a custom transformer called PointCloudLASClassifier to make the operation even more efficient. It is essentially one large TestFilter that is preset to know what values to look for. This means we will not have to manually add and set up Tester or TestFilter transformers as was done in the previous example. We will use this transformer in this tutorial to split the point cloud by classification.

1. Read 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:

Click OK to add the reader to the canvas.

 

2. Add a PointCloudSplitter 

Add a PointCloudSplitter transformer and connect its Input port to the LAS reader feature type. Double-click the PointCloudSplitter to open the parameters and set the following:

  • Split By: classification
  • Split Type: Unique
  • Output Attribute: _classification
    • This must be the output attribute name because the PointCloudLASClassifier is set up to read the attribute _classification

 

3. Add a PointCloudLASClassifier

Since this is a custom transformer, it will have to be installed. To do so, begin typing the transformer name onto the canvas as you usually would. If the transformer does not appear, ensure you have the Community tab selected as included in the search. 

Press Enter and then click Install in the install warning dialog.

Connect the PointCloudSplitter Split output port to the PointCloudLASClassifier LAS_Point_Cloud input port.

 

4. Run the Workspace and View Output

Run the workspace with caching enabled and view the caches. You can also write the data to LAS files or view with an Inspector transformer. 

The example dataset outputs six classifications: 1 (Unclassified), 2 (Ground), 3 (Low Vegetation), 5 (High Vegetation), 6 (Building), and 9 (Water). If you are using your own LAS dataset you may have more or fewer classes. The images below show the output in FME Data Inspector, with the numbers associated with each classification. 

 

Splitting by Class and Elevation

The next example is more complex, as we will be using two PointCloudSplitters and an orthophoto to provide additional coloring to the resulting point cloud. Depending on your needs, you may be interested in only a certain class of points as well as other components like intensity, elevation, colour, etc. Further manipulation of colour can help to distinguish differences or areas of focus. To learn how this can be done, follow the steps below.

1. Read 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:

Click OK to add the reader to the canvas.

 

2. Add a PointCloudSplitter 

Add a PointCloudSplitter transformer and connect its Input port to the LAS reader feature type. Double-click the PointCloudSplitter to open the parameters and set the following:

  • Split By: classification
  • Split Type: Unique
  • Unique Values to Keep: 2
    • This is the classification value for ground, which will ensure the output is ground points
  • Output Attribute: _ground

 

3. Add a Second PointCloudSplitter

We will now split the ground points by elevation. Add a second PointCloudSplitter transformer and connect the previous PointCloudSplitter Split output port to the new PointCloudSplitter_2 Input port. 

Set the following parameters in PointCloudSplitter_2:

  • Split By: z
    • The z component represents elevation
  • Split Type: Range
  • Output Attribute: _ground
  • Ranges to Keep: Enter the ranges from the table below to split the ground points into three categories
From To
0 5
5 20
20 50

 

4. Add a Tester

We will use Tester transformers to select the points within each range we set. Connect the PointCloudSplitter_2 Split output port to a Tester Input port and set the following Tester parameters:

  • Left Value: _z
  • Operator: =
  • Right Value: 0 .. 5

Click OK to close the parameters. Select the Tester transformer and right-click, then select Duplicate twice to make two copies and repeat the above step, but with the remaining range categories for the Right Value:

Left Value Operator Right Value
_z = 5 .. 20
_z = 20 .. 50

 

5. Add a PointCloudOnRasterComponentSetter

Add three PointCloudOnRasterComponentSetter transformers, one connected to each Tester passed Output port through the PointCloud input port. We will focus on the PointCloudOnRasterComponentSetter for the low elevation range first (0 .. 5).

In this example we would like to highlight the low elevation range by using an orthophoto to colour these points. To do this, we will add orthophoto data using a GeoTIFF reader. 

 

6. Add a GeoTIFF Reader

Click the Reader button in the Toolbar and set the following parameters to add the orthophoto to the workspace: 

Connect the added GeoTIFF reader feature type to the first PointCloudOnRasterComponentSetter Raster input port.

 

7. Set Low Elevation Parameters

In the PointCloudOnRasterComponentSetter parameters, ensure the component is set to color:

  • Components to Set: Color

This will set the low elevation points to the orthophoto raster color.

 

8. Add a RasterRGBCreator

We will use a RasterRGBCreator transformer to use as the Raster input for both the medium and high elevation.

Add a RasterRGBCreator to the workspace and connect its Created output port to the PointCloudOnRasterComponentSetter_2 and PointCloudOnRasterComponentSetter_3 Raster input ports:

In the RasterRGBCreator parameters, we will set the number of columns and rows to match the GeoTIFF orthophoto:

  • Number of Columns (Cells): 13334
  • Number of Rows (Cells) 13333 

 

9. Set Medium Elevation Parameters

For the medium elevation stream (Tester_2 and PointCloudOnRasterComponentSetter_2), set the following parameters in the PointCloudOnRasterComponentSetter_2 dialog:

  • Components to Set: Custom
  • Components: Enter the values from the table below to set the components
Band Component Default Value
0 color_red 75
1 color_green 0
2 color_blue 130

This will set the medium elevation points to a dark purple.

 

10. Set High Elevation Parameters 

For the medium elevation stream (Tester_3 and PointCloudOnRasterComponentSetter_3), set the following parameters in the PointCloudOnRasterComponentSetter_3 dialog:

  • Components to Set: Custom
  • Components: Enter the values from the table below to set the components
Band Component Default Value
0 color_red 25
1 color_green 25
2 color_blue 112

This will set the medium elevation points to a dark blue.

 

11. Add a PointCloudCombiner

To put all the changed point clouds together, add a PointCloudCombiner. Connect each of the three PointCloudOnRasterComponentSetters’ PointCloud output ports to the PointCloudCombiner Input port.

 

12. Run Workspace and View Output

Before running the workspace, we can add a LAS writer to view the data in Data Inspector, or we can use the cached output to inspect the data in Data Preview.

Run the workspace and view the output using your preferred method. The image below shows the output LAS file in FME Data Inspector, with the low elevation range represented with the orthophoto, medium elevation displayed in purple, and high elevation in blue. 

To learn more about change point cloud colours, view the Color and Point Clouds article.

 

Additional Resources

Tutorial: Getting Started with Point Clouds

Setting a Point Cloud’s Color Components in FME

PointCloudSplitter Transformer Documentation

PointCloudOnRasterComponentSetter Transformer Documentation

RasterRGBCreator Transformation Documentation

PointCloudLASClassifier Transformer Documentation 

 

Data Attribution

The data used here originates from open data made available by the City of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.

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.