FME Transformers: 2024.1

Categories
Data Quality
Geometries
Related Transformers
Chopper
LineExtender
PathSplitter
VertexRemover

Snipper

Shortens linear geometry by cutting off the ends.

Jump to Configuration

Typical Uses

  • Shortening or segmenting linear features

How does it work?

The Snipper receives features with line, arc, path, or non-donut area geometry and shortens them according to a specified Starting and Ending Location along the feature.

The snipping locations can be set in a variety of ways:

  • Exact distance along the feature in ground units

  • Percentage distance along the feature

  • Measures

  • Vertex numbers (indices)

The portion of the geometry between the snipping locations is output. The snipped-off portions at either end are output as Remnants.

Areas with portions snipped become non-closed and are output as lines. Donut areas are not supported.

Z Values

Z values are supported. If the snipping location is a new vertex, the z value is determined by linear interpolation between the input vertices on either side.

When Snipping Mode is Distance (Value) or Distance (Percentage), z values may be used for distance calculation only if Measurement Mode is 3D. Otherwise, distances are determined by x and y coordinates only.

Snip by Distance (Value)

When entering distance values, note that:

  • Zero (0) is the start point of the geometry.

  • Any negative value is interpreted as the end point of the geometry.

  • Any value larger than the total length of the geometry is interpreted as the end point.

  • If the snipping location does not coincide with an existing vertex, a new vertex is added.

Action

Distance Values

Result

None (Input Feature)

 

Snip out a section of the line.

Snip off the end of the line.

Snip off the beginning of the line.

Snip off an equal amount at both ends.

Snip by Distance (Percentage)

When entering percentage values, note that:

  • Zero (0) is the start point of the geometry and 100 is the end point.

  • Any negative value is interpreted as the end point of the geometry.

  • Values greater than 100 are interpreted as the end point of the geometry.

  • If the snipping location does not coincide with an existing vertex, a new vertex is added.

Action

Percentage Values

Result

None (Input Feature)

 

Snip out a section of the line.

Snip off the end of the line.

Snip off the beginning of the line.

Snip by Vertex

When entering vertex indices, note that:

  • Zero (0) is the first vertex of the geometry.

  • -1 is the last vertex of the geometry.

  • Negative numbers represent vertices relative to the last vertex, where -2 is second-to-last, -3 is third-to-last, and so on.

  • Snipping may only performed at existing vertices.

  • Out-of-range index numbers are interpreted as either the first vertex (if less than 0) or last vertex (if larger).

Action

Indices

Result

None (Input Feature)

 

Snip out a section of the line.

Snip off the last two segments of the line.

Snip off the first segment of the line.

Snipping with Measures

When entering measures, note that:

  • Snipping with measures determines snipping locations according to measure values, not vertex coordinates.

  • If the snipping location does not coincide with an existing vertex, a new vertex is added.

  • Out-of-range measure values are interpreted as either the first or last vertex, depending on whether they are less than or greater than the range of measure values on the feature.

Action

Measures

Result

None (Input Feature with measures)

 

Snip out a section of the line with Measure (Value).

Snip out a section of the line with Measure (Relative to Start Point).

Usage Notes

Creating and Modifying Linear Features

These transformers work with lines in a variety of ways.

Configuration

Input Ports

Output Ports

Parameters

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.

For more information, see Transformer Parameter Menu Options.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies None
Aliases  
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 Snipper 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.