Files
Introduction
Network topology is made from a network of nodes and lines that is maintained throughout an area. The vitality of topological networks relies on consistent and connective geometry. Topology is often applied to transportation datasets to ensure certain logic is being followed (i.e., for addressing over or underpasses on a highway).
In this scenario, we are faced with a centrelines road.gdb (accessible here) of Surrey, BC. To create an accurate topological network, we will need to perform some geometric handling. When working with advanced topologies, you may choose to apply validation rules to produce a more sophisticated network.
What is required before you can build a topological network?
- Lines must touch at an END vertex (snapped).
- Lines must be split at junctions. (i.e., junctions must be at the end of a line, not at an interior vertex).
- No complex edges present (FME doesn't support these).
To learn how to identify bad topology, please reference the examples in this tutorial: Data QA: Identifying Bad Topology in Linear Networks.
Step-by-step Instructions
Download TopologyBuilderArticle.zip to follow along with this exercise from home.
1. Start Workbench
Open Workbench and start a new workspace.
2. Add an Esri Geodatabase (File Geodb Open API) Reader
Leave all parameters as default. Click OK to add the reader to the canvas.
3. Add a Deaggregator
Use the transformer gallery or another method to add a Deaggregator. Leave all parameters as default. Connect it to the Esri Geodatabase reader. By deaggregating, we break multi-part lines into separate features each line feature for later operations.
4. Add a PathSplitter
Now we are going to create line segments by adding a PathSplitter. Leave all parameters as default. Connect the output port from the Deaggregator.
Paths are sometimes used for complex edges. These are continuous edges that have path segments where other lines join at a junction (FME doesn't support complex edges).
5. Run your workspace
Let's take a look at our transformation so far. Run your workspace with feature caching enabled and use the Visual Preview window to inspect the road data. Currently, we have been segmenting features to apply topology.
As we inspect the data, we notice some features are not aligned (i.e., vertices at a junction must be at exactly the same point/location). Please reference the bottom left image. The image on the right shows the expected alignment. So, how do we address this issue?
We can also choose to view our data in the FME Data Inspector, which offers additional functionality, such as the measure tool, compared to the Data Preview window (user preference). You can access FME Data Inspector through the Start menu. Once initiated, select File > Open Dataset to view your file.
12. Add an Esri Geodatabase (File Geodb Open API) Writer
Finally, let's write the results. Add an Esri Geodatabase (File Geodb Open API) writer. Select a file destination for your dataset. Set Coord. System to LL84. Open the parameters, and change Overwrite Existing Geodatabase to Yes. Leave the default parameters. Connect the Edge output port from the TopologyBuilder to the Esri Geodatabase writer feature type. Click OK. Run your workspace.
As of FME 2025.2, the Coordinate System parameter is now configured within the Parameters dialog of each reader/writer format. For more information, including details about the change and affected transformers, please see Coordinate System Parameter Location Change.
You have now created a topological network for road centerlines in Surrey, BC. The final workspace should look similar to below:
Use FME Data Inspector or the Visual Preview Window to inspect your results.
Data Attribution
The data used here originates from data made available by the City of Surrey, British Columbia. It contains information licensed under the Open Government License - Surrey.