Intersect Layers (Overlay) Command


The Intersection tool demonstrates how two geodatabase layers or shapefiles can be combined to create a new shape file. The tool intersects the two layers, writing the results out to the created shape file. The attributes from both layers are added to the new features, and the user has the option of specifying whether numeric fields are copied or proportioned.

How to use:
  1. Browse and select the IntersectPrj.dll using the 'Add From File' button on the customization dialog.
  2. From the 'Developer Samples' commands category, add the 'Intersect Wizard . . .' command to an existing toolbar.
  3. Make sure you have at least two polygon geodatabase or shapefile layers in the active map, and then select the new tool.
  4. Use the wizard to specify the two layers to intersect, and the name of the output shape file to create, and then select the Next button.
  5. The second page of the wizard allows you to specify which numeric fields will be proportioned (i.e., the resulting value in the new feature will be based on the proportion of the original feature present).


Requires: An Arcmap session with at least two polygon layers.

Difficulty: Advanced

Visual Basic
File Description
frmIntersect.frm Form containing the Intersect wizard dialog.
frmResources.frm Form containing the tool icon.
basSettings.bas Basic module that dimensions all global variables.
Intersect.cls Class containing the main code for performing the intersection.
IntersectPrj.vbp The project file for the intersection tool.

Key CoClasses: FeatureClass, Fields, Field, FeatureLayer, FeatureCursor, Feature
Key Interfaces: IFeatureClass, IFieldsEdit, IField, IFeatureCursor, IFeature, IGeometry, IArea