logo_web1.jpg (5049 bytes)
HOME ET Solution Center index HOME

Create topologically correct polyline dataset / Create polygons from polylines

This article tries to answer some very important and commonly asked questions:
  • How to identify topology problems in a polyline dataset?

  • How to correct topology problems in a polyline dataset?

  • How to create polygons from polylines?

using the functions available in ET GeoWizards with any ArcGIS license (ArcView, ArcEditor or ArcInfo).
Original dataset

As an example source data we have a set of polylines digitized in a CAD package and converted to a shapefile. The dataset has about 4500 features and looks comparatively good (for data captured in CAD). Even after zooming in quite a lot, there is no problem seen.

STEP 1:

The first step we need to go through with each dataset is to analyze it for topology problems. Problems in the connectivity in a polyline dataset can be identified using the  Export Nodes function.

Export Nodes - 5100 Dangling nodes found in the original dataset!!!!

The function creates a point dataset that contains the end points (nodes) of all polylines in the source dataset. The points are analyzed and classified in three groups:

  • Pseudo- two lines meet in this node
  • Regular- three or more polylines are connected to this node

As seen from the resulting nodes, the connectivity in the dataset is not that good. In locations where apparently three or more lines connect we have red (dangling) nodes.

Typical digitizing errors:

If we zoom to some of the dangling nodes we will see something like this. The most common errors - undershoots and overshoots
After Clean Polylines - node inserted at intersection 

Large fuzzy tolerance used (dashed line). The dangling segment removed, but a significant shift from the original coordinates can be seen.

STEP 2:

Clean Polylines function will do the following.

  • Create intersections in all locations where two polylines intersect.
  • Resolve self intersecting polylines
  • Clean duplicate polylines
  • Move the vertices that are closer to each other than the fuzzy tolerance to the same location

Note: Do not use large Fuzzy/Cluster tolerance. It might introduce unwanted approximation of the shapes

After Clean Dangling Nodes

In some cases (depending on the data) some of the dangling nodes cannot be removed using the automatic procedure described here and some manual editing might be required. ET GeoTools has several tools that will help you to productively fix the remaining topological problems. See this video for an example

STEP 3:

Clean Dangling Nodes function will do the following:

  • Extend the undershoots to the closest polyline and create node at the intersection
  • Delete overshoots
  • Snap nodes if there is a gap in the data (optional)
  • Snap a dangling polyline to the closest polyline (optional)

STEP 4: Analyze Nodes again. If there are remaining dangling nodes, repeat steps 3 (with larger tolerance)  and 4.

After Clean Pseudo Nodes

STEP 5:

Clean Pseudo Nodes function will merge the polylines that connect into a pseudo node. The function can use multiple attributes for dissolving polylines and has a variety of attribute transfer rules that can be very useful when processing street data, but in this case (preparing the data for polygons ) none of this is needed.

STEP 6: Analyze Nodes again

Resulting polygons

STEP 7: 

Build Polygons function will create polygons from the topologically correct dataset created above.

If a point dataset with attribute data is available, the attributes can be assigned to the polygons using Spatial Join

See ET GeoWizards User Guide for more information

For any comments and enquiries contact: webmaster@ian-ko.com
Esri and all Esri products mentioned are trademarks of Environmental Systems Research Institute, Inc.
Copyright: Ianko Tchoukanski