FillAndMerge Tool

Created:11/7/2002
Description:

The Polygon Fill Tool is designed to create a new polygon geometry based on the tracing of edges in an enclosed area (enclosed by edges in the active topology). In other words, fill an enclosed area with a new polygon geometry. The geometry that is created is then merged with the selected polygon from the target layer.

The tool needs a single edge selected to begin the trace and an indication as to which side of the edge is to be filled (traced). Selection of the edge and the indication of the right or left of the edge is done by dragging a box out on the screen. The first location you click at indicates the side of the edge to fill, the second click creates the box that is used to select the edge to begin the trace with. Only one edge can be selected with the box you create.

The feature to merge with is also chosen by the box dragged out on the screen.


How to use:
  1. In the Customize dialog, click on 'Add from file' and select this sample's dll.
  2. Under the Commands tab of the Customize dialog, select the FillAndMerge Tool from the 'Developer Samples' category, and drag it on to a toolbar. Dismiss the Customize dialog.
  3. Begin editing and set the target layer to be a polygon layer.
  4. Zoom to an area you want to fill (create a new polygon geometry in). The Extent needs to include the entire enclosed area to be filled.
  5. Activate the FillAndMerge Tool and drag out a box on the screen that will select a single edge in the active topology to begin the trace from and a single polygon from the target layer to merge the new geometry with. The first click in creating the box defines which side of the edge will be filled.

Application:
ArcMap

Requires: Editable topology data

Minimum ArcGIS Version Required: 8.3

Difficulty: Advanced


Visual Basic
File Description
frmResources.frm Holds the bitmap for the FillAndMerge Tool.
FillAndMergeTool.cls Class containing the code for the FillAndMerge Tool.
FillAndMergeToolPrj.vbp The project file for the FillAndMerge Tool.


Key CoClasses: Polygon, TopologyEdge, TopologyGraph, TopologyNode
Key Interfaces: IEnumNodeEdge, ITopologicalOperator, ITopologyEdge, ITopologyGraph, ITopologyNode
Key Members: IEnumNodeEdge::Next, ITopologicalOperator::Union, ITopologyEdge::FromNode, ITopologyEdge::ToNode, ITopologyGraph::EdgeSelection, ITopologyGraph::Select, ITopologyNode::Edges