ArcStroker
Replaces arc or ellipse geometry with interpolated straight line segments.
Typical Uses
-
Preparing geometry for transformation, reprojection, or formats where arcs are not supported
How does it work?
The ArcStroker receives features with vector geometry and converts any arcs to a series of interpolated line segments.
Ellipses are converted to polygons. Paths will have any arc segments stroked while passing through line segments unchanged.
The number of interpolated edges may be determined by:
-
Letting the ArcStroker choose a reasonable number (default)
-
Specifying an exact number of segments to create per arc (Stroke By > Number of Interpolated Edges)
-
Specifying the maximum distance the new line segments may be from the original arc position (Stroke By > Maximum Deviation)
This example shows a circular arc stroked with four (4) interpolated edges:
Examples
In this example, we have some transit lines which are composed of lines and arcs. We will stroke the arcs using different settings and examine the results.
The features are in a UTM coordinate system with ground units in meters.
The features are routed into an ArcStroker.
Default: ArcStroker chooses a reasonable number of edges
In the parameters dialog, the default settings of zero (0) interpolated edges are kept. The transformer will calculate a reasonable value.
The output feature, shown in blue over the original arc in yellow, is a line with 23 coordinates. Note that it tightly follows the original arc, and coordinate 4 is highlighted.
The line segments to either side of the arc have been passed through unchanged.
Specifying an exact number of edges
In the parameters dialog, the number of interpolated edges is set to 3.
The output feature, shown in blue with the original arc in magenta, is a line with three segments (and so four coordinates).
It visibly deviates from the original arc, but has few points and so will optimize storage and processing.
Specifying Maximum Deviation to tightly follow an arc
In the parameters dialog, Stroke By is set to Maximum Deviation, with a value of 0.1 meters. This will prevent stroked segments from being positioned more than 10 centimeters away from the original arc.
The output feature, shown in blue over the original arc in yellow, is a line with 44 coordinates. Coordinate 3 is highlighted.
This feature follows the original arc even more tightly than the default setting, producing nearly double the number of interpolated points.
Usage Notes
-
Maximum deviation is a measurement in ground units. Features with a geographic (lat/long) coordinate system may need to be reprojected before using this option.
-
To reverse arc stroking, consider using the Curvefitter or ArcEstimator.
Creating and Modifying Arcs, Circles, and Ellipses
These transformers work with arcs in a variety of ways.
|
Function |
Geometry Out |
Z Coordinates |
---|---|---|---|
Creates one or more new features with arc geometry (when Geometry Object is an arc type). |
Arc by center point Arc by center point with ends Arc by 3 points Arc by bulge Ellipse (Arc by center point) |
Supported |
|
Replaces any existing feature’s geometry with a 2D arc. |
Arc by center point |
No |
|
Replaces any existing feature’s geometry with a 3D arc. |
Arc by center point |
Yes, at center point |
|
Replaces an existing feature’s geometry with a 2D ellipse or circle (closed arc). |
Ellipse (Arc by center point) |
No |
|
Modifies an existing arc or converts a point to an arc. |
Arc by center point Arc by center point with ends Arc by 3 points |
Supported, at center and/or ends |
|
Modifies an existing ellipse (closed arc) or converts a point to an ellipse. |
Ellipse (Arc by center point) |
Supported, at center point |
|
Extracts the property values that describe an arc’s geometry and stores them as attributes. |
Arc by center point Arc by center point with ends Arc by 3 points Arc by bulge |
Supported |
|
Extracts the property values that describe an ellipse’s geometry and stores them as attributes. |
Ellipse (Arc by center point) |
Supported |
|
Converts arcs and ellipses to lines or polygons by interpolating points along the arc. |
Path Line Area |
Supported |
|
Replaces geometry with an arc described by the first, middle, and last vertices of the input feature. |
Arc by 3 points |
Supported |
|
Replaces lines or polygons with an optimal combination of line and arc segments, creating smooth curving lines. |
Path Area Arc by bulge Line |
Supported |
|
Reduces point density on lines or polygons, fitting arcs where possible (When using Algorithm > Douglas With Arc Fitting (Generalize) ). |
Path Area Arc by 3 points Line |
Supported |
|
Either replaces an existing feature’s geometry with circle that contains all of its vertices or extracts the circle property values into attributes. |
Ellipse (Arc by center point) |
No |
Configuration
Input Ports
Features with arc or ellipse geometry. Other vector features including points, lines, and areas are passed through unchanged.
Output Ports
Features with arcs and ellipses converted to line or area geometry as specified in parameters.
Features with geometry other than line, arc, path, polygon, or ellipse are output here, as are features with invalid geometry.
Rejected features will have an fme_rejection_code attribute with one of the following values:
INVALID_PARAMETER_NUMBER_OF_INTERPOLATED_EDGES
INVALID_PARAMETER_MAXIMUM_DEVIATION
INVALID_GEOMETRY_TYPE
INVALID_GEOMETRY
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
Stroke By |
Select a stroking method:
|
||||
Number of Interpolated Edges |
When Stroke By is Number of Interpolated Edges:
|
||||
Maximum Deviation |
When Stroke By is Maximum Deviation, specify the maximum distance in ground units that new geometry may be from the original arc. If the this value is greater than the primary or secondary axis of the arc or ellipse, the stroked arc will have the minimum number of edges possible. If less than or equal to 0, the value of Workspace Parameters > Translation > Stroking Tolerance is used. If that value is also less than or equal to 0, the transformer will use Number of Interpolated Edges > zero (0) instead. |
||||
Make Polygon Out of 360 Degree Arcs |
If Yes, arcs with a 360-degree sweep angle are converted into polygons. If No, they are converted into lines. |
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 |
No |
Dependencies | None |
Aliases | ClothoidStroker |
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 ArcStroker on the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver and/or the Open Government Licence – Canada.