FME Transformers: 2024.2
FME Transformers: 2024.2
PointCloudMerger
Typical Uses
- Transferring component values between co-located point clouds
- Performing change detection on point clouds
- Removing duplicate points from point clouds
How does it work?
The PointCloudMerger receives point cloud features and merges them, identifying matching individual points based on component values which may include both location (x, y, and z components) and other standard or user-defined components.
There are two input ports:
- Requestor: Point clouds that will receive merged component values, and
- Supplier: Point clouds that will provide new component values.
Requestor and Supplier points are successfully matched when the components specified in the Join On parameter all have the same value for both the Requestor and Supplier.
Multiple point clouds may be sent to either port, and they may be grouped. The same point cloud may be connected to both input ports.
There are multiple output ports, each producing an output point cloud with the following characteristics:
- Merged: Points from the Requestor that successfully found a match and received component values from a Supplier point.
Where duplicate Supplier points are found, only the first one encountered is used, therefore Requestor points are not duplicated. - Not Merged: Points from the Requestor that did not find a match in the Supplier.
For change detection purposes (where the Requestor is the original point cloud), these may have been deleted or had a component value changed. - Referenced: Points from the Supplier that were successfully matched to a Requestor point, and had their component values transferred onto that Requestor point.
- Unreferenced: Points from the Supplier that were not matched to a Requestor point.
For change detection purposes (where the Requestor is the original point cloud), these may have been added or had a component value changed. - Duplicate Supplier: Points from the Supplier that have the same Join On component values as a point that was previously Referenced.
When a Requestor finds a Supplier, the components from the Supplier are merged on to the Requestor. If the Requestor already had a component with the same name, the Conflict Resolution parameter controls which value is preferred for the merged point cloud.
Examples
Example: Merging two point clouds with different components
In this example, we have two co-located point clouds, each with a different set of components.
The first one has a selection of standard components, but does not have classification.
The second point cloud has a classification component.
Both point clouds are routed into a PointCloudMerger. The first (A) is the Requestor, and the second (B) is the Supplier. Any components on B will be merged onto A.
In the parameters dialog, a join is defined for the x, y, and z components, matching individual points on position only.
The point cloud output from the Merged port contains all points that found a positional match, and has components from both original point clouds.
Example: Change detection - identifying deleted points
In this example, we have two point clouds - one of which is a thinned version of the other. We want to identify which points were deleted in the thinning process.
The initial point cloud (A) has 23,035,567 points.
The thinned point cloud (B) has 10,000,000 points.
Both point clouds are routed into a PointCloudMerger. The original (A) is the Requestor, and the thinned point cloud (B) is the Supplier.
In the parameters dialog, a join is defined for the x, y, and z components, matching individual points on position.
The point cloud output from the Merged port will contain the points that existed both in the original and the thinned versions.
The point cloud output from the NotMerged port contains 13,035,567 points that were in the original and did not appear in the thinned version - therefore, they were deleted.
Example: Removing duplicates from a point cloud
In this example, we have an XYZ point cloud of 10,000,000 points. The file is over 600 MB, and we want to reduce the complexity of it.
Note that the coordinates are floating-point values.
We will do this in two steps:
- Round the coordinate values by converting them from floating-point to integer using a PointCloudComponentTypeCoercer.
- Identify and discard the resulting duplicates with a PointCloudMerger.
In the parameters dialog of the PointCloudComponentTypeCoercer, the x, y, and z components are converted to type Int32 (32-bit integer), and rounded.
Note that the coordinate component values are now integers.
The point cloud is now routed into the PointCloudMerger as both the Supplier and the Requestor - effectively merging it with itself.
The coordinate rounding produced a large number of duplicated point positions. In the case where a location contains multiple points with different classification values, we want to keep one of each classification.
A join is created on the x, y, and z components for position, and classification is joined as well.
When a merge is performed, each unique Supplier point (with uniqueness determined by the combination of all defined Join On component values) is used only once. The first instance is output in the Referenced point cloud, and all duplicates are output in the DuplicateSupplier point cloud.
By merging the point cloud with a copy of itself, all unique Referenced points will be output exactly once - effectively stripping duplicates from the point cloud.
Note that the Referenced point cloud has 2,696,791 points - down from the original 10,000,000.
Usage Notes
- To concatenate or combine point clouds together (as opposed to merging component values), use the PointCloudCombiner.
- A single point cloud can be connected to both input ports, providing a way to identify and remove duplicate points.
- When merging based on x, y, and z components, the values must match exactly. A PointCloudExpressionEvaluator may be used to round the values and ensure matching.
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).
Point Cloud Transformers
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
Requestor
Point clouds to be matched to and receive component values from Suppliers.
Supplier
Point clouds to be matched to and provide component values to Requestors.
Output Ports
Merged
Requestor points that find a matching Supplier, with component values transferred from those Suppliers.
NotMerged
Requestor points that do not find a matching Supplier.
Referenced
Supplier points that are found by at least one Requestor.
Point clouds output via this port will have an additional reference_count component added, specifying the number of times each point was referenced.
Unreferenced
Supplier points that are not found by any Requestor.
DuplicateSupplier
Supplier points with the same Join On component values as an earlier Supplier point.
<Rejected>
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
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
Group Processing
Group By |
If Group By attributes are selected, features with the same values in the Group By attributes are grouped together, and point clouds will only be merged with other point clouds in the same group. |
||||
Complete Groups |
Select the point in processing at which groups are processed:
Considerations for Using Group By
There are two typical reasons for using When Group Changes (Advanced) . The first is incoming data that is intended to be processed in groups (and is already so ordered). In this case, the structure dictates Group By usage - not performance considerations. The second possible reason is potential performance gains. Performance gains are most likely when the data is already sorted (or read using a SQL ORDER BY statement) since less work is required of FME. If the data needs ordering, it can be sorted in the workspace (though the added processing overhead may negate any gains). Sorting becomes more difficult according to the number of data streams. Multiple streams of data could be almost impossible to sort into the correct order, since all features matching a Group By value need to arrive before any features (of any feature type or dataset) belonging to the next group. In this case, using Group By with When All Features Received may be the equivalent and simpler approach. Note Multiple feature types and features from multiple datasets will not generally naturally occur in the correct order.
As with many scenarios, testing different approaches in your workspace with your data is the only definitive way to identify performance gains. |
Join On
Each line in this table specifies a component join pair. Multiple pairs may be defined, including coordinates and other standard or user-defined components.
Points are only considered a match if the values for all components included in this table are equal.
Requestor |
Requestor component to be joined on. |
Supplier |
Supplier component to be joined on. |
Note that the drop-down menus for both Requestor and Supplier provide a list of standard component names. User-specified component names may be entered directly in both columns.
Merge Parameters
Conflict Resolution |
Conflicts occur when Requestors and Suppliers both have a component with the same name.
|
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.
How to Set Parameter Values
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.
Content Types
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. |
Dialog Options - Tables
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 |
Yes |
Dependencies | None |
Aliases | |
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 PointCloudMerger 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: point "point cloud" cloud PointCloud LiDAR sonar