Snipper
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.
The parameters specify a starting and ending point for the snipping. After execution, the feature's geometry will be a line representing the portion of the original line between those two positions, inclusive of the endpoints. New coordinates will be generated at the beginning or end of the line, if there are not already coordinates at exactly the specified positions. If the line contains three-dimensional coordinates, the Z value at each endpoint will be interpolated linearly from the original feature's coordinates between which the endpoint exists.
Input Ports
Features with polygon or line geometries are accepted. Aggregate features will be accepted if the Aggregate Handling parameter is Deaggregate.
Output Ports
Features with the shortened geometries are output through this port.
Features with the removed portions of the original geometries are output through this port.
Features without polygon or line geometries (for example, points and donut polygons) are output through this port. Aggregate features will be rejected if the Aggregate Handling parameter is Reject.
Parameters
Mode
Distance (Value) or Distance (Percentage): The amount to snip from the beginning and end of the line can be specified as either a measurement in ground units or a percentage of the line's entire length, starting from the first coordinate.
A negative value specifies the final vertex on the line. Values larger than the measurement of the original line will be interpreted as the end point.
Each of these parameters may either be entered as a number, or can be taken from the value of a feature attribute by selecting the attribute name from the pull-down list.
If the Measurement Mode is 3D, and the linear feature has Z coordinates, all measurements will be taken as a distance from one vertex to the next in 3D space. Otherwise, only the X and Y coordinates will be considered, and measurements will be planar distances between vertices.
Measure (Relative to Start Point): The values specified in the Starting Location and Ending Location parameters refer to the absolute difference in the measure value of the start point of the original line and the start or end points of the resulting line respectively.
Negative values will be interpreted as the start point of the original line and values larger than the measurement of the original line will be interpreted as the end point.
If the Measure Name field is blank, the default measure values are used. Otherwise, the measure values with the name specified in the Measure Name field are used instead.
Measure (Value): The values specified in the Starting Location and Ending Location parameters refer to the measure values at the start and end points of the resulting line.
Any value less than the input’s starting measure will be interpreted as the start point of the original line and values larger than the input’s ending measure will be interpreted as the end point of the original line.
If the Measure Name field is blank, the default measure values are used. Otherwise, the measure values with the name specified in the Measure Name field are used instead.
Vertex: The vertices from the original line which are to form the first and last vertices of the resulting line are specified as a numeric index, with "0" being the first vertex of the line.
Negative numbers measure vertices relative to the last point in the line, with the value "-1" used to specify the vertex which is the last vertex of the line's geometry, "-2" the second last vertex, and so on. If the input vertex number is smaller than the negative absolute value of the total number of vertices, then it will be interpreted as the starting vertex of the original line and if it is larger than the total number of vertices, it will be interpreted as the ending vertex.
Each of these parameters may either be entered as a number, or can be taken from the value of a feature attribute by selecting the attribute name from the pull-down list.
Parameters
Choose how aggregate geometries are to be handled.
Deaggregate: Decompose aggregates into their individual components.
Reject: Do not process aggregates and output them via the <Rejected> port.
Measurement
Choose how Z coordinates are handled. This parameter does not have any effect on two-dimensional lines. This parameter is enabled when the Snipping Mode is Distance (Value) or Distance (Percentage).
2D: Only X and Y coordinates are considered.
3D: If the linear feature has Z coordinates, all measurements will be taken as a distance from one vertex to the next in 3D space.
Distance, Percentage, or Measure Values
The value used to determine the start of the resulting line when the Snipping Mode is Distance (Value), Distance (Percentage), Measure (Relative to Start Point), or Measure (Value).
The value used to determine the end of the resulting line when the Snipping Mode is Distance (Value), Distance (Percentage), Measure (Relative to Start Point), or Measure (Value).
Measure Name
The measure values with the specified name are used when the Snipping Mode is Measure (Relative to Start Point) or Measure (Value). If this parameter is blank, the default measure values are used.
Indices
The vertex from the original line which is to form the first vertex of the resulting line specified as a numeric index, with "0" being the first vertex of the line. This parameter is enabled when the Snipping Mode is Vertex.
The vertex from the original line which is to form the last vertex of the resulting line specified as a numeric index, with "0" being the first vertex of the line. This parameter is enabled when the Snipping Mode is Vertex.
Example
Suppose you have a line with measures that range from 4 to 16. The Starting Location has the value 6 and the Ending Location has the value 8.
If the Snipping Mode is Measure (Value), the resulting feature would have measures that range from 6 to 8.
If the Snipping Mode is Measure (Relative to Start Point), the resulting feature would have measures that range from 10 (= 4 + 6) to 12 (= 4 + 8).
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.
Transformer Categories
Transformer History
This transformer replaces the DistanceSnipper and VertexSnipper.
Technical History
Associated FME function or factory: @Snip, @Tcl2
Search FME Community
Search for samples and information about this transformer on the FME Community.
Tags Keywords: DistanceSnipper VertexSnipper