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.
Parameters
Mode
The mode you choose determines which parameters are available and how they are interpreted. Therefore, only the mode parameters are listed here.
In all modes, features containing geometry other than polygons or lines (for example, points and donut polygons) will be passed through this transformer untouched via the <Rejected> port. Aggregate features, including homogeneous aggregates, are also rejected.
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.
Any negative value may be used to specify an ending position corresponding to the original line's final vertex. 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.
Usage Notes
The Measurement Mode parameter does not have any effect on two-dimensional lines, or when the Snipping Mode is Vertex.
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.
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.
Tags Keywords: DistanceSnipper VertexSnipper