PointCloudStatisticsCalculator
Calculates statistics on point cloud components and adds the results as attributes.
Typical Uses
- Inspecting and analyzing point cloud features
- Calculating statistics for use in further operations
How does it work?
The PointCloudStatisticsCalculator receives point cloud features and calculates selected statistics on each one individually. The results are output on each point cloud feature.
Available statistics include:
- Minimum
- Maximum
- Mean
- Sum
- Range
- Standard Deviation
- Median
- Mode
Statistics may be calculated for any or all of these point cloud components:
- x
- y
- z
- intensity
- color_red
- color_green
- color_blue
- classification
- return
- number_of_returns
- angle
- flight_line
- scan_direction
- point_source_id
- posix_time
- user_data
- gps_time
- gps_week
- flight_line_edge
- normal_x
- normal_y
- normal_z
Statistics are stored as attributes, named <component>.<statisticname>, where <statisticname> will be one of the following: min, max, range, mean, stdev, sum, median, mode.
For example, if the median was calculated for component z, then an attribute named z.median would be added to the feature.
In this example, we will calculate some statistics on a LiDAR point cloud. The source data has a number of components that we may use.
The point cloud is routed into a PointCloudStatisticsCalculator.
In the parameters dialog, we select the components of interest and choose which statistics are to be calculated for each one.
The output feature has new attributes containing the requested statistics. Note that the attribute names are composed of the component name and statistic type.
Usage Notes
- To calculate point cloud statistics on a group of point clouds as a single entity, merge them prior to this transformer with the PointCloudCombiner transformer.
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).
PointCloudCoercer |
Coerces point cloud geometries into points or multipoints. |
PointCloudCombiner |
Combines multiple geometries into a single point cloud. Point cloud features will be accumulated as is. PointCloudCombiner is often used to accumulate multiple point clouds into a single point cloud feature, but can also convert other geometries into point clouds and merge them. |
PointCloudComponentAdder |
Adds new components with constant values to a point cloud. |
PointCloudComponentCopier |
Copies an existing component to a new component with the specified name. The existing component remains and a new component is created that has a different name, but the same values. |
PointCloudComponentKeeper |
Removes all components from a point cloud, except for the specified ones. |
PointCloudComponentRemover |
Removes specified components from a point cloud. |
PointCloudComponentRenamer |
Renames an existing component. |
PointCloudComponentTypeCoercer |
Converts the type of point cloud components. |
PointCloudConsumer |
Requests the point(s) from the point cloud geometry but no actual operations are performed on the point(s). |
PointCloudCreator |
Creates a new point cloud feature with the specified size and components and sends it into the workspace for processing. |
PointCloudExpressionEvaluator |
Evaluates expressions, such as algebraic operations or conditional statements, to set point cloud component values. |
PointCloudExtractor |
Serializes the geometry of the feature into the Blob Attribute based on the selected writer format. |
PointCloudFilter |
Filters a point-cloud feature into one or more parts, output via separate ports, based on evaluating expressions. |
PointCloudMerger |
Merges component values from one point cloud to another. Features that contain the desired components are connected through the Supplier port, and the features that will receive the components are connected through the Requestor port. |
PointCloudOnRasterComponentSetter |
Sets point cloud component values by overlaying a point cloud on a raster. The component values for each point will be set from band values at the point location. |
PointCloudPropertyExtractor |
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. |
PointCloudReplacer |
Replaces the geometry of the feature with the geometry held in the Blob Attribute. The blob is decoded according to the selected point cloud format. |
PointCloudSimplifier |
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. |
PointCloudSorter |
Sorts a point cloud by the values of components. |
PointCloudSplitter |
Splits a single point cloud feature into multiple point cloud features, each having a homogeneous value for the point component that governs the split. |
PointCloudStatisticsCalculator |
Calculates statistics on point cloud components and adds the results as attributes. |
PointCloudSurfaceBuilder |
Takes an input point cloud and reconstructs it into an output mesh. |
PointCloudThinner |
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. |
PointCloudTransformationApplier |
Applies transformations on a point cloud. Applying a transformation is primarily done for compatibility with other processing and writers that cannot support the transformation natively. For example, the LAS reader produces Int32 coordinates with a scale and offset. However, the POINTCLOUDXYZ writer cannot support component scale/offsets, so the transformation will be applied. The resulting coordinates will be Real64 with no transformation. Note that processing and writers that cannot support transformations will apply them automatically, but this transformer can be used to manually apply the transformation if desired. |
Configuration
Input Ports
This transformer accepts only point cloud features.
Output Ports
Point cloud features with requested statistics added as attributes.
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
This table specifies which statistics to calculate for each component.
Component | Select which components to include, one per line. | ||||||||||||||||
Statistics |
The following statistics may be calculated:
|
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
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. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
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. |
Reference
Processing Behavior |
|
Feature Holding |
No |
Dependencies | None |
FME Licensing Level | FME Professional Edition and above |
Aliases | |
History | |
Categories |
FME Community
The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
Search for all results about the PointCloudStatisticsCalculator on the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver