Create topologically correct polyline dataset / Create polygons from polylines.

This article tries to answer some very important and commonly asked questions:

Only functions available in ET GeoWizards are used.

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.


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.

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

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

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.

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.

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

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