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. 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), set the appropriate environments, the Output has Z values, and the Output has M values as desired. Note that the spatial reference used during processing is the same as the output spatial reference; therefore, all input features must be within the x-, y-, z-, and m-domains.
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.
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.