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.
Crossing
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 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 Two lines are output, each passing through the junction. Parameter settings: Combine on Attributes: Name Junctions: Consider Attribute Values |
|
Output 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 Two lines are output unchanged. Parameter settings: Input Feature Topology: End Noded |
|
Output 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
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.
|
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. |
|
Turning linear features into areas. |
Turns input linear features into areas by adding their start point as the end point. |
|
Making linear features longer by a specific amount and at an appropriate angle. |
Creates two-point extensions to linear features that extend the feature by a user-specified length. |
|
Chopping features into smaller features. |
Breaks input features into points, lines, or areas. Chopped features contain the same set of vertices as input features. |
|
Breaking a path into its component segments (lines and arcs). |
Decomposes a path feature into its component segments. |
|
Shortening linear features by cutting off the ends. |
Shortens the geometry of a line feature from the ends by snipping specified distances, indices, or measure values. It operates on features with simple line geometry and polygons without holes. |
|
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
This transformer accepts features with line geometry.
Output Ports
Combined line and path features are output via this port, as are any untouched input line features.
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
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:
|
Accumulation Mode |
Specify how attributes are accumulated on combined lines:
|
||||||||
Generate List |
When enabled:
|
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
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. |
Dialog Options - Tables
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.
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 and/or the Open Government Licence – Canada.