Closing Gaps and Overlaps

The Close Gaps and Overlaps tool can be used to close the gaps (or overlaps) between a selection of polygon and/or polyline objects.

This functionality is of particular use for cleaning up polygons and polylines prior to Creating 2D Meshes, as it can be used to remove small gaps and overlaps that would otherwise cause many small triangles to be generated in the mesh.

To close gaps between objects:

  1. Select the objects to be cleaned. (Gaps between selected and unselected objects will not be closed. Special rules apply to cross section lines and bank lines, as described in Methodology below).
  2. Choose Geometry | Close gaps from the Model menu. The Close Gaps and Overlaps Dialog will be displayed.
  3. Specify the maximum size of any gap or overlap that is to be closed in the Where gap or overlap is smaller than field.
  4. Click Select to select all polygons and lines in the current selection that have gaps or overlaps that meet the maximum size specified. The number of gaps or overlaps found is reported. The current selection of objects is updated to include only those objects that meet the specified parameters.
  5. Click Close to close gaps and overlaps. The number closed is reported and may be different reported in the previous step, as the action of closing one gap may create another, which is also closed.

The tool attempts to close all gaps and overlaps in a single pass. Sometimes this is not possible. To check, press Select again. If more gaps are reported, press Close to close them. Repeat as necessary.

Methodology

The method for identifying and closing gaps and overlaps is as follows:

A gap or overlap is measured from a vertex on one polygon or line to the nearest point on the nearest line segment on any other selected polygon or line. If this is less than the specified maximum gap, then:

Special rules apply to cross-section lines and bank lines, as these lines have elevation and other data associated with each vertex and so in general it is not appropriate to create, move or delete vertices on these lines. The rules are:

The process of closing gaps is repeated along the boundary of a given polygon or line, in each direction, until none remain, whereupon the process moves on to the next selected object.

Because closing a gap between two objects has the potential to create a gap with a third object, the process does not necessarily result in zero gaps for the complete set of selected objects. This is the reason why the user may need to repeat the process, as described above.

Limitations

The Close Gaps and Overlaps tool cannot be used for river reaches and bridges due to their complex geometry. Instead, it is possible to apply the tool to the cross-section and bank lines, prior to building the river reaches and bridges, subject to the special rules for these lines noted above.

If a line or polygon boundary is extremely convoluted (for instance, if a loop is thin enough to bend back and re-enter a gap) then it is possible for the snapping process to cause the line or boundary to meet or cross itself. If suspected, this problem can be checked and sometimes corrected using the Simplify Object Geometry tool.

Multi-part polygons (i.e. polygons containing internal holes and/or islands) may not be handled correctly. Gaps should close correctly if the outer polygon is convex. If the outer polygon is concave, or there are overlaps, it is possible there will be incorrect snapping to holes or to the (hidden) line-segments that link the holes and outer polygon together.

Advanced Polygon and Polyline Editing

Close Gaps and Overlaps Dialog

Cropping Polygons and Polylines

Simplifying Object Geometry