FME Transformers: 2024.2
FME Transformers: 2024.2
PointCloudComponentTypeCoercer
Alters the data type of point cloud components, and converts component values if required.
Typical Uses
- Changing component data type to meet processing or format requirements.
How does it work?
The PointCloudComponentTypeCoercer receives point cloud features, alters the data type of selected components, and then outputs the modified point cloud feature.
Options are available to control the manner in which values are converted, including methods for scaling values to fit a new data type and choices for rounding when converting from floating-point values to integers.
Components can be converted to any of these data types:
- Real64
- Real32
- UInt64
- UInt32
- UInt16
- UInt8
- Int64
- Int32
- Int16
- Int8
- String
Examples

In this example, we will apply color to a point cloud using an orthophoto raster. The raster is RGB48 - that is, each of its color bands are 16 bits.
Note that the source point cloud feature does not have color components (colors shown in the FME Data Inspector are simply a representation of elevation - z coordinates).
We want to produce a point cloud with 8-bit color components, and so need two steps.
First, both the point cloud feature (LAS) and the raster feature (GEOTIFF) are routed into a PointCloudOnRasterComponentSetter, where colors will be extracted from the orthophoto and applied to the point cloud as components.
Next, the resulting point cloud feature (with 16-bit color components) is sent on to a PointCloudComponentTypeCoercer, where the data type will be changed and the color values scaled accordingly.
Step 1 - Applying Colors
In the parameters dialog of the PointCloudOnRasterComponentSetter, Components to Set is set to Color.
.
Note that the point cloud feature produced in this first step now has color components, and they are data type UInt16 (unsigned integer, 16-bit).
When examining a single point in the point cloud, we can see that the color values fall within the range of 0 to 65535 (the possible values for a 16-bit unsigned integer).
Step 2 - Altering Data Type and Scaling Values
In the parameters dialog of the PointCloudComponentTypeCoercer, all three color components are set to Type UInt8, and the Conversion Type is set to Scale by data type. This will scale the values while preserving their proportions in regard to the original and new types’ ranges.
The output point cloud feature now has 8-bit color components.
Individual points’ color values have been proportionately scaled, and now fall within the range of 1 to 255 - the possible values for an 8-bit unsigned integer.
Usage Notes
Choosing a Point Cloud Transformer
FME has a selection of transformers for working specifically with point cloud data.
For information on point cloud geometry and properties, see Point Clouds (IFMEPointCloud).

Combines features into a single point cloud. Point cloud and non-point cloud geometries are supported. |
|
Adds new components with constant values to a point cloud. |
|
Copies selected component values onto either a new or existing component |
|
Keeps only specified point cloud components, discarding all others. |
|
Removes specified components from a point cloud. |
|
Renames an existing component. |
|
Alters the data type of point cloud components, and converts component values if required. |
|
Reads point cloud features for testing purposes, including any accumulated point cloud operations. No additional operations are performed, and nothing is done with the features. |
|
Creates a point cloud of specified size and density, with default component values. |
|
Evaluates expressions on each point in a point cloud feature, including algebraic operations and conditional statements, and sets individual point cloud component values. |
|
Serializes the geometry of a point cloud feature into a Blob attribute, encoding the contents according to a choice of common binary point cloud formats. |
|
Separates point clouds into multiple features, based on evaluating expressions including component values, and creates a separate output port for each expression defined. |
|
Merges point clouds by joining points where selected component values match (join key), including x, y, z, and other components. Component values are transferred between point clouds and output is filtered based on matching success and duplication. |
|
Sets point cloud component values by overlaying a point cloud on a raster. The component values for each point are interpolated from band values at the point location. |
|
Extracts the geometry properties of a point cloud feature and exposes them as attributes, optionally checking for their existence, retrieving component properties, and finding minimum and maximum values. Extents may also be recalculated and updated. |
|
Decodes a binary attribute containing encoded point clouds stored as Blobs, replacing the feature’s geometry with the decoded point cloud. |
|
Reduces the number of points in a point cloud by selectively keeping points based on the shape of the point cloud. The simplified and removed points are output as two discrete point clouds. |
|
Sorts the points within a point cloud by one or more component values. |
|
Separates point clouds into multiple features based on component values, color, or first/last return. |
|
Calculates statistics on point cloud components and adds the results as attributes. |
|
Takes an input point cloud and reconstructs it into an output mesh. |
|
Reduces the number of points in (thins) a point cloud by keeping points at a fixed interval, a maximum number of points, or a set quantity of first or last points. Remaining points are discarded. |
|
Converts point clouds to point or multipoint geometries, optionally retaining attribute and component values. |
|
Applies a point cloud’s scale, offset, or transformation matrix to it, recalculating component values and removing the transformation values. |
Configuration
Input Ports

This transformer accepts only point cloud features.
Output Ports

Point cloud features with component data types altered as specified in the parameters.

Non-point cloud features will be routed to the <Rejected> port, as well as invalid point clouds.
Rejected features will have an fme_rejection_code attribute with one of the following values:
INVALID_GEOMETRY_TYPE
MISSING_FEATURE_COMPONENTS
Rejected Feature Handling: can be set to either terminate the translation or continue running when it encounters a rejected feature. This setting is available both as a default FME option and as a workspace parameter.
Parameters

Each line in this table specifies a component to be altered, and parameters for doing so.
Multiple components may be modified.
Component |
Select or enter the name of the component to be modified. |
||||||||||
Type |
Select the desired data type of the component. |
||||||||||
Conversion Type |
Select a method for conversion. Note Scale/Offset: Note that all conversion types except Scale by data values, preserve values are applied to the raw data values, before any transformation is applied. To convert a value in its end form (as it appears with scale and/or offset applied), use a PointCloudTransformationApplier to apply the scale/offset transformation prior to changing the component data type.
* Note: Cast and Bounded Cast use C-style casts. |
||||||||||
Rounding Type |
Specifies the action to perform when converting from a floating-point value to an integer.
|
Editing Transformer Parameters
Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.

These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |

Table Tools
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
For more information, see Transformer Parameter Menu Options.
Reference
Processing Behavior |
|
Feature Holding |
No |
Dependencies | None |
Aliases | PointCloudColourScaler, PointCloudColorScaler |
History |
FME Community
The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.
Search for all results about the PointCloudComponentTypeCoercer on the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.
Keywords: PointCloudColorScaler