FME Transformers: 2024.2
FME Transformers: 2024.2
HullAccumulator
Creates a convex or concave hull based on a group of input features.
Typical Uses
-
Creating hull geometry over multiple features.
How does it work?
The HullAccumulator receives features with geometry and calculates either a Convex or Concave hull around them.
A convex hull is a polygon covering the extents of all features, where no interior angle is greater than 180 degrees. It resembles an elastic band surrounding the features.
A concave hull (or alpha hull) has no restrictions on angle and may follow the general shape of the data more tightly. It is calculated using the Alpha Value parameter and can have multiple parts and donuts.
If an output hull has zero area (the hull of a single point or vertical line, for example), it will become a point or line as appropriate.
3D hulls may be generated when input features are either 3D or a mix of 3D and 2D. If mixed, 2D features are assigned a default Z value.
Concave hulls and alpha values
Concave hulls vary in shape. They are calculated by first triangulating the dataset, then measuring the circumradius of the resulting triangles (the radius of a circle that touches all three points of the triangle). Triangles that are larger than the specified Alpha Value are discarded, and the rest are dissolved to form the hull. Measurements are in ground units.
If the Alpha Value is explicitly specified, it is used for the calculation. If it is zero (0) or not specified, the alpha is approximated as the smallest value that produces a single area. If the alpha is too small it may return a null geometry. Larger numbers generally produce larger areas, and a large enough alpha value produces the same result as a convex hull.
See Examples below to see the effect of varying the Alpha Value.
Geometries that are farther away than Alpha Value from the rest of the geometries may be discarded if they do not constitute a valid area on their own.
Concave hull generation works best with points, but line and area geometries will be accepted and converted to points if input.
Examples
Example: Generating a convex hull around point features
In this example, we have a set of address points and want to generate a convex hull around them.
The features are routed into a HullAccumulator.
In the parameters dialog, Hull Type is Convex ().
The output hull contains all input features.
Example: Concave hulls and alpha values
In this example, we will generate a series of concave hulls for a set of property addresses while varying alpha values.
The input features are in a UTM83-10 coordinate system, with ground units in meters, and so the alpha value represents a measurement in meters as well.
Alpha Value |
Concave Hull |
---|---|
10 - Too small for useful results. |
|
50 - Tightly fitting, some input points fall outside alpha distance. |
|
Default (blank) - optimal value calculated to produce a single area. |
|
500 - Loosely fitting but not convex. |
|
10000 - Identical to the convex hull. |
Usage Notes
- Point clouds are considered single features. To create a hull from a point cloud’s individual points, use a PointCloudToPointCoercer beforehand, setting the Output Geometry parameter to either Single Multipoint or Individual Points.
-
For triangulated surfaces, see the SurfaceModeller, Triangles output.
Configuration
Input Ports
Input
Features with 2D and/or 3D geometry.
Arcs and ellipses will be stroked prior to the calculation of the hull. Text features will be treated as points.
Output Ports
Hull
Hull geometry as specified in parameters. Typically a polygon, but possibly a line or a point.
<Rejected>
Features without valid geometry are output via this port, as are features with non-numeric values for Alpha or Default Z Value.
Rejected features will have an fme_rejection_code attribute with one of the following values:
INVALID_GEOMETRY_VERTICES
INVALID_PARAMETER_ALPHA_VALUE
INVALID_PARAMETER_DEFAULT_Z_VALUE.
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 specified, a hull output feature is generated for each set of input features that have the same values for all those attributes. Otherwise, a single feature representing the hull of all input features is output. |
||||
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. |
Hull
Hull Type |
Select the hull type to be calculated:
|
Alpha Value |
When Hull Type is Concave)(, either:
See Examples above for alpha value usage. |
Attribute Accumulation
Accumulation Mode |
Drop Incoming Attributes: The hull receives no attributes. Merge Incoming Attributes: The hull receives all attributes from input features. Use Attributes From One Feature: The hull receives all attributes from one representative feature. |
Output Dimension
Output |
Select the dimensionality of the output hull:
|
||||
Default Z Value |
When Output is 3D, provide a Z value to assign to converted 2D features. |
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 | ConvexHullAccumulator |
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 HullAccumulator 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.