TopologyBuilder

From fmepedia

(Redirected from TopologyBuilder Example)

TopologyBuilder is a Workbench Transformer.


Table of contents



Description

Computes topology on input point, line, and/or area features.

Topologically significant nodes and lines are computed using all input features and output. The factory does not assume that all input data is clean and noded properly. It takes any data and constructs the resulting topology after computing any intersections present in the input data.

It outputs the significant NODEs and LINEs with attributes describing their topological relationships. AREAs are output with information about the LINEs which form them.

If Propagate All Attributes From Input is set to Yes, attribute lists are added to each output feature, composed of attributes from the relevant input features. For each node, this will be a list of lines and a list of polygons touching the node; for lines, there will be a list of nodes and a list of polygons; and for polygons, a list of nodes and a list of lines. The base names for the lists will be _nodes, _lines, and _polygons. (Note that for these lists to be manipulated in Workbench, they must first be exposed using an AttributeExposer. Be sure to include "{}" in the exposed attribute names, e.g.: "_nodes{}".)

Preserve Internal Edges (Advanced) specifies that coordinate "cycles" within a polygon are allowable and will be preserved.

This transformer is typically used to determine topological relationships to aid in decision making in later transformers.

See this page for an example workspace containing a TopologyBuilder.



Example 1 - Bus Stops

This example relates to this FME group question (http://finance.groups.yahoo.com/group/fme/message/12283).


A set of transport data consists of bus routes and stops. The idea is to measure the length between each stop. The problem is how to obtain the ID from each stop and attach it to that section of route. The answer is to use a PointOnAreaOverlayer followed by a TopologyBuilder. The TopologyBuilder creates a node ID for each stop, after which FeatureMergers are used to match the node ID for stops/routes and thereby obtain the stop ID.


Workspace Screenshot

image 'TopologyBuilder Example.jpg' not found



Example 2 - Assume Clean Data

In this example, a user has a road dataset and wishes to create network attributes that define line and node IDs and their connectivity.

The key issue is what happens at a bridge or overpass? In this screenshot (below) we see the source road is a complete line that passes over (and does not intersect) the street beneath:


Image:tb1.png


After the transformation with TopologyBuilder, the network attributes are created (below):

Image:tb3.png


... but unfortunately the linework has been intersected where it crosses (below):

Image:tb2.png


In FME2009 or newer this unwanted data cleaning can be prevented with use of the "Assume Clean Data" option (below):

Image:tb4.png


When turned on this gives us the correct result (below):

Image:tb5.png

User Comments Add a new comment