FME Transformers: 2024.2
FME Transformers: 2024.2
AreaBuilder
Creates polygons from topologically correct linear features.
Typical Uses
- Creating polygons from linear features
- Checking linear network topology
How does it work?
The AreaBuilder receives features with linear geometry (lines, paths, and polygons) and creates areas wherever the linework surrounds closed shapes.
Areas are output, as well as any geometry not used for area creation.
Attributes may be merged or dropped, or accumulated in a list attribute along with an optional direction attribute that records the orientation of the input features.
Output polygon boundaries may be either lines or paths that preserve the input segments. Where areas are contained within other areas, donuts may be created and the donut holes either output or discarded.
Stricter rules may be applied for successful area formation, including checking for continuous curve direction and internal edges (cycles).
Aggregate geometries are either deaggregated or rejected.
Z values are supported.
Preparing input features for the AreaBuilder
Input features must have clean topology or they will not be used and output as Incomplete. The AreaBuilder has snapping capability, but more pre-processing may be required.
Topology issues could be:
- Features not terminating at intersections
- Misaligned nodes
- Overshoots/undershoots
- Missing nodes at intersections
These transformers may be useful for pre-processing input features.
|
Use This For |
Description |
---|---|---|
Snapping together misaligned nodes with more options than the AreaBuilder’s built-in snapping. |
Brings lines, segments, end points or vertex points of features together if they are within a certain distance of each other and (optionally) if they have attributes in common. |
|
Splitting intersecting features, adding new nodes where necessary. |
Computes intersections between all input features, breaking lines and polygons wherever an intersection occurs/ |
|
Chopping geometry into two-point lines, without adding any new nodes. |
Chops line, arc, path, or area features into smaller features based on number of vertices or approximate length. |
|
Adding length to undershoots (followed by an Intersector). |
Extends line, arc, or path features at both ends by a specified length. |
|
Building full topology on input features, which includes intersecting them. |
Computes topology on input point, line, and/or area features, and outputs significant nodes, edges, and faces with attributes describing topological relationships. |
Examples
Example: Building areas from a streets dataset
In this example, we have a set a street features and want to build area polygons from them.
Note that the selected street is a single linear feature for its entire length.
The features are routed into an AreaBuilder.
In the parameters dialog, the default Polygon settings are used.
A list attribute named Streets is added which will contain the name of all surrounding streets for each output area, as well as the line segment orientation.
The output is not very successful, creating only a few areas.
An Intersector is added, with default settings used.
Note that the intersected output features are now split wherever they intersect another feature.
The intersected features are routed through another AreaBuilder (and then randomly colored for illustration purposes).
The output is successful this time. Note the list attribute, containing the street names and geometry orientation.
Example: Internal Edges (Cycles)
The Build Internal Edges (Advanced) parameter is for use with geometry that contains duplicate segments in opposing directions (cycles), as shown here.
Note that two features are selected, one on top of the other.
The second feature's coordinates are reversed. It's orientation is the opposite of the first feature.
The features are routed into an AreaBuilder.
When Build Internal Edges (Advanced) is No (the default), two areas are output and one of the duplicate segments is sent to the Incomplete output port.
If Create Donuts was enabled, the outer polygon would become a donut, and the inner its donut hole.
When Build Internal Edges (Advanced) is Yes, one area is created using all segments to form a continuous boundary with internal edges.
Usage Notes
- As input features must be topologically correct for AreaBuilder to create polygons, it can be useful for checking topology.
- The AreaBuilder has some snapping capability, but the Snapper provides more snapping options.
Creating and Modifying Area Features
These transformers work with polygons in a variety of ways.
Area Transformers Comparison
Transformer |
Use this to... |
Transformer Description |
---|---|---|
Create one or more new features with area geometry (when Geometry Object is Polygon). |
Creates features using the parameters supplied, and sends them into the workspace for processing. |
|
Create areas from topologically connected lines where they form closed shapes. |
Creates polygons from topologically correct linear features. |
|
Create areas from individual linear features. |
Converts a linear feature to an area by connecting the end point to the start point. |
|
Combine touching or overlapping areas to create larger areas. |
Combines overlapping and/or adjacent areas into larger contiguous areas by removing shared and interior edges. |
|
Calculate areas. |
Calculates the planar or sloped area of polygon geometries and adds the results as attributes. |
|
Clean up overlaps and gaps to create contiguous coverage. |
Repairs area topologies by resolving gaps and overlaps between adjacent areas. |
|
Generalize areas. |
Generalizes area geometry by connecting and combining neighboring features and/or filling in holes and details. |
|
Convert donut areas to non-donut areas. |
Adds internal edges to connect donut holes to the outer shell, producing a non-donut polygon. |
|
Convert areas within areas to donut holes. |
Cuts holes in area features where they fully enclose another area, creating donut polygons. |
|
Separate donut areas into their parts. |
Separates donut polygons into outer shell and hole polygons. |
|
Count the number of holes in a donut area. |
Retrieves the number of holes in donut polygons, storing the result as an attribute. |
|
Find polygon overlaps and extract them into new geometry. |
Performs an area-on-area overlay (intersection of polygons) so that all input areas are intersected against each other and resultant area features are created and output. The resultant areas can accumulate attribute from any overlapping polygons. |
|
Find intersections between lines and polygons, splitting either where they intersect. |
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). |
|
Identify points that fall within polygons, and share attributes between them. |
Performs a point-in-polygon overlay. Points may receive containing area attributes, and areas may receive contained point attributes (spatial join). |
Configuration
Input Ports
Input
Features with topologically correct linear geometry.
Output Ports
Area
Polygons created from the input features as specified in parameters.
Incomplete
Features that were not used to create areas.
<Rejected>
Rejected features will have an fme_rejection_code attribute with one of the following values:
INVALID_GEOMETRY_TYPE
INVALID_GEOMETRY_VERTICES
INVALID_GEOMETRY_DEGENERATE
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
Group Processing
Group By |
The default behavior is to use the entire set of input features as the group. This option allows you to select attributes that define which groups to form – each set of features that have the same value for all of these attributes will be processed as an independent group. No attributes other than the Group By ones will be carried across from the Input features to the output features. |
||||
Complete Groups
|
Select the point in processing at which groups are processed:
Considerations for Using Group By
There are two typical reasons for using When Group Changes (Advanced) . The first is incoming data that is intended to be processed in groups (and is already so ordered). In this case, the structure dictates Group By usage - not performance considerations. The second possible reason is potential performance gains. Performance gains are most likely when the data is already sorted (or read using a SQL ORDER BY statement) since less work is required of FME. If the data needs ordering, it can be sorted in the workspace (though the added processing overhead may negate any gains). Sorting becomes more difficult according to the number of data streams. Multiple streams of data could be almost impossible to sort into the correct order, since all features matching a Group By value need to arrive before any features (of any feature type or dataset) belonging to the next group. In this case, using Group By with When All Features Received may be the equivalent and simpler approach. Note Multiple feature types and features from multiple datasets will not generally naturally occur in the correct order.
As with many scenarios, testing different approaches in your workspace with your data is the only definitive way to identify performance gains. |
Polygon
Consider Node Elevation |
Select an option for handling z values, if they exist:
|
||||||||||||||||||
Connect Z Mode |
When Consider Node Elevation is No, select a method for handling z values if they exist. 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 |
Select a method for creating area geometry:
|
||||||||||||||||||
Build Internal Edges (Advanced) |
Select an option for creating cycles in areas:
A cycle is a line segment that occurs twice in the same polygon's boundary, once in each direction. Note that areas with cycles may be considered invalid for other geometry processing or unsupported by some output formats. |
||||||||||||||||||
Check Curve Direction |
Select an option for evaluating the orientation of input features:
|
||||||||||||||||||
Aggregate Handling |
Choose how aggregate geometries are to be handled. Deaggregate: Decompose aggregates into their individual components. With this setting, the transformer might output more features than were given as inputs. Reject: Do not process aggregates and output them via the <Rejected> port. |
||||||||||||||||||
Create Donuts |
When enabled, areas fully contained within other areas produce donut polygons. The donut holes may be either kept or discarded. Donut holes that share edges are dissolved into larger holes.
When disabled, all areas are output without holes, and containing areas are not considered. Donuts and List Attributes: When list attributes are created on donut polygons, list items are included for all input features, including those that make up both the containing area and all holes. |
Snapping Pre-Processing
Snapping Type |
Select a method for the optional pre-processing of input features:
When two features are snapped together, the last feature (in order of processing) is modified to match the first. |
||||||
Snapping Tolerance |
When Snapping Type is End Point Snapping or Vertex Snapping, specify the maximum distance in ground units between points for them to be snapped together. |
Attribute Accumulation
Accumulation Mode |
Specify how attributes are accumulated on areas:
|
||||||
Generate List
|
When enabled:
|
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.
How to Set Parameter Values
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.
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.
Content Types
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
Table Tools
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.
For more information, see Transformer Parameter Menu Options.
Reference
Processing Behavior |
|
Feature Holding |
Yes |
Dependencies | None |
Aliases | Polygonizer PolygonBuilder |
History |
FME Community
The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.
Search for all results about the AreaBuilder 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.