Skip To Content

How Union works

Union calculates the geometric union of any number of feature classes and feature layers.

All input feature classes or feature layers must be polygons.

The output feature class will contain polygons representing the geometric union of all the inputs as well as all the fields from all the input feature classes. See below for examples of how attribute values are assigned to the output features.

Union does the following:

  • Determines the spatial reference for processing. This will also be the output spatial reference. For details on how this is done, see Spatial reference and geoprocessing. All the input feature classes are projected (on the fly) into this spatial reference.
  • Cracks and clusters the features. Cracking inserts vertices at the intersection of feature edges; clustering snaps together vertices that are within the x,y tolerance.
  • Discovers geometric relationships (overlap) between features from all feature classes.
  • Writes the new features to the output.

When multiple feature classes or layers are specified in the list of input features, the order of the entries in the list does not affect the output feature type, but the spatial reference of the top entry on the tool dialog box (the first entry in scripting) in the list will be used during processing and set to the output.

To explicitly control the output spatial reference (coordinate system and domains), override the default spatial reference properties using the appropriate geoprocessing environments.

Tip:

Union can run with a single input feature class or layer. In this case, instead of discovering overlap between the polygon features from the different feature classes or layers, it will discover the overlap between features within the single input. The areas where features overlap will be separated into new features with all the attribute information of the input feature. The area of overlap will always generate two identical overlapping features, one for each of the features that participates in that overlap.

Below is an example of Union with features within a feature class that overlap. In this case, the area of overlap will be duplicated to maintain all the attributes and areas. To re-create the overlapping features, use the Dissolve tool on the feature class produced by Union, and dissolve by all fields except FID.

Union example 1

Below is an example of the result of executing Union with the Gaps Allowed parameter unchecked. A polygon feature is created that would otherwise be left empty. The "gap" features can be identified by doing an attribute query of all the input feature's FID fields that equal -1.

Union example 2

Related topics