FME Transformers: 2024.1
FME Transformers: 2024.1
LineCombiner
Connects line features that meet at common start or end points to create longer lines or paths.
Typical Uses
-
Connecting multiple lines into longer, continuous lines or paths
How does it work?
The LineCombiner receives features with line geometry and merges them where they meet at the same start or end x and y coordinates, producing a continuous line or path, depending on parameter choices and input feature properties.
Attribute values can be optionally used to group the input features to be combined, with various options for attribute accumulation including the creation of List attributes .
Z Values
Z values are supported and optional. The Consider Node Elevation parameter dictates how they are handled:
-
If Yes, nodes will only be combined if the x, y, and z coordinates are an exact match.
-
If No, nodes are combined where the x and y coordinates are a match, and the z values are further handled according to the Connect Z Mode parameter.
Junctions, Intersections, and Crossings
Input line features may cross and intersect in numerous ways, and their handling depends on a combination of parameters.
Crossings
A simple crossing, where no vertices exist at the point of intersection, is handled as if the lines do not interact at all. There are no junctions.
Input Lines have a Name attribute, either A or B. They cross but do not intersect. |
|
Output: 2 Lines Two lines are output. Parameter settings: Combine on Attributes: None or Combine on Attributes: Name |
|
Intersections/Junctions
The LineCombiner cannot connect more than two lines at a single node. Combinations are determined by the Combine On Attributes and Junctions parameters.
Input Lines have a Name attribute, either A or B. They intersect, having a node in common where they meet. This junction has four line segments converging. |
|
Output: 2 Lines Two lines are output, each passing through the junction. Parameter settings: Combine on Attributes: Name Junctions: Consider Attribute Values |
|
Output: 4 Lines Four lines are output, each terminating at the junction. Parameter settings: Combine on Attributes: Name Junctions: Ignore Attribute Values or Combine on Attributes: No items selected. Junctions: Consider Attribute Values or Combine on Attributes: No items selected. Junctions: Ignore Attribute Values |
|
Mid-line Intersections
Where a line meets another at a point along the line (not an end point), the Input Feature Topology parameter determines the output.
Both features must have a vertex in common.
Input Two lines are input, with the attribute Name either A or B. They meet as a T intersection, where B touches A mid-line. Both lines have a vertex at that location. |
|
Output: 2 Lines Two lines are output unchanged. Parameter settings: Input Feature Topology: End Noded |
|
Output: 3 Lines Three lines are output. Input line A is split at the junction. Parameter settings: Input Feature Topology: Vertex Noded |
|
Output Lines and Paths
Output features are either lines or paths, depending on both parameters and the properties of the input features.
Lines are output unless paths are required. When lines are created, the matching combined nodes are collapsed into a single node (pseudonodes are removed).
Paths retain all input nodes, keeping the input features intact as segments in a longer complex path geometry. Paths are output if Preserve Lines as Path Segments is Yes, or if the input geometry has properties that vary, such as measures, traits or geometry names.
Duplicate input features are discarded.
Note that path geometry is not supported in all output formats. See also: Line and Path geometry.
Examples
Example: Reconstructing intersected geometry
In this example, we have a set of streets that have been split at all intersections, producing multiple individual lines for each street. We want to reconstruct the original whole streets.
Note that the features have a NAME attribute, which will be used to combine them.
The features are routed into a LineCombiner.
In the parameter dialog, Combine On Attributes is set to NAME.
The output features are continuous lines.
Usage Notes
- The Intersector and Snapper may be useful in preparing data for the LineCombiner.
Creating and Modifying Linear Features
These transformers work with lines in a variety of ways.
Line Transformers Comparison
|
Function |
Transformer Description |
---|---|---|
Simple creation of lines from lines and/or points. |
Connects sequential point and/or line features to create line or area geometry. |
|
Combining adjoining lines into longer lines or complex paths, with more advanced geometry handling options than the LineBuilder. |
Connects line features that meet at common start or end points to create longer lines or paths. |
|
Combining arcs and lines into longer paths. |
Connects sequential line and/or arc features to create path geometry, preserving input segments. |
|
Converting linear features into areas. |
Converts a linear feature to an area by connecting the end point to the start point. |
|
Extending linear geometry. |
Extends line, arc, or path features at both ends by a specified length. |
|
Chopping features into smaller features, breaking them at their existing vertices. |
Chops line, arc, path, or area features into smaller features based on number of vertices or approximate length. |
|
Breaking a path into its component segments (lines and arcs). |
Splits path geometry into its component line and/or arc segments. |
|
Shortening linear geometry. |
Shortens linear geometry by cutting off the ends. |
|
Intersecting lines and areas. |
Performs a line-on-area overlay, either splitting lines where they intersect area boundaries or subdividing areas where split by lines. Attributes may be shared between related lines and areas (spatial join). |
|
Intersecting lines and lines. |
Performs a line-on-line overlay in which all input lines are intersected against each other and resultant line features are created and output. Intersection points are turned into point features that can contain the merged list of attributes of the original intersected lines. |
|
Finding where points lay on lines. |
Performs a point-on-line overlay. Each input line is split at its closest place to any point within the specified point tolerance, and attributes may be shared between related points and lines (spatial join). |
Configuration
Input Ports
Input
This transformer accepts features with line geometry.
Output Ports
Line
Combined line and path features are output via this port, as are any untouched input line features.
<Rejected>
Features with geometry other than valid line geometry are output via this port.
Rejected features will have an fme_rejection_code attribute with one of the following values:
INVALID_GEOMETRY_TYPE
INVALID_GEOMETRY_VERTICES
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
General
Combine On Attributes |
Specify any attributes to be used for grouping lines to be combined. |
||||
Junctions |
Select a method for handling multiple lines meeting at the same node:
|
||||
Input Feature Topology |
Select a method for handling features that intersect mid-line:
|
Attribute Accumulation
Accumulation Mode |
Specify how attributes are accumulated on combined lines:
|
||||||||
Generate List |
When enabled:
|
Advanced Parameters
Preserve Orientation |
Specify whether or not lines can be reversed in order to create longer lines.
|
||||||||||||||||||
Break On Loops |
Select a method for handling any closed line features (input or output) where the start and end x and y coordinates are the same.
|
||||||||||||||||||
Consider Node Elevation |
Select whether or not z values are to be considered when matching nodes:
See Z Values above. |
||||||||||||||||||
Connect Z Mode |
When Consider Node Elevation is No, select a method for determining z values when combining nodes that differ. Select a method. Connect Z Mode
When viewed in 2D (ignoring Z), a path (which may define the border of a polygon) may appear to be closed as shown in the left figure below. This same path, when viewed in 3D, may appear to be open as shown in the right figure below.
To specify how (and if) paths should be closed in 3D, select one of the listed modes.
|
||||||||||||||||||
Preserve Lines as Path Segments |
Specify whether combined lines should be path geometry rather than line geometry:
See Output Lines and Paths above. |
||||||||||||||||||
Aggregate Handling |
Select how aggregate geometries are to be handled:
|
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 | PseudoNodeRemover, LineJoiner |
History |
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 LineCombiner 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.