Computes a geometric union of the Input Features. All features will be written to the Output Feature Class with the attributes from the Input Features, which it overlaps.
All input feature classes and feature layers must have polygon geometry.
The Allow Gaps parameter can be used with the ALL or ONLY_FID settings on the Join Attribute parameter. This allows for identification of resulting areas that are completely enclosed by the resulting polygons. The FID attributes for these GAP features will all be -1.
Attribute values from the input feature classes will be copied to the output feature class. However, if the input is a layer or layers created by the Make Feature Layer tool and a field's Use Ratio Policy is checked, then a ratio of the input attribute value is calculated for the output attribute value. When Use Ratio Policy is enabled, whenever a feature in an overlay operation is split, the attributes of the resulting features are a ratio of the attribute value of the input feature. The output value is based on the ratio in which the input feature geometry was divided. For example, If the input geometry was divided equally, each new feature's attribute value is assigned one-half of the value of the input feature's attribute value. Use Ratio Policy only applies to numeric field types.Caution:
Geoprocessing tools do not honor geodatabase feature class or table field split policies.
This tool will use a tiling process to handle very large datasets for better performance and scalability. For more details, see Geoprocessing with large datasets.
This tool may generate multipart features in the output even if all inputs were single part. If multipart features are not desired, use the Multipart to Singlepart tool on the output feature class.
With ArcView and Editor licenses, the number of input feature classes or layers is limited to two.
A list of the input feature classes or layers. When the distance between features is less than the cluster tolerance, the features with the lower rank will snap to the feature with the higher rank. The highest rank is one. All of the Input Features must be polygons.
The feature class that will contain the results.
Determines which attributes from the Input Features will be transferred to the Output Feature Class.
The minimum distance separating all feature coordinates (nodes and vertices) as well as the distance a coordinate can move in X or Y (or both).
Gaps are areas in the output feature class that are completely enclosed by other polygons. This is not invalid, but it may be desirable to identify these for analysis. To find the gaps in the output, set this option to NO_GAPS, and a feature will be created in these areas. To select these features, query the output feature class based on all the input feature's FID values being equal to -1.
The following Python window script demonstrates how to use the Union function in immediate mode.
import arcpy from arcpy import env env.workspace = "C:/data/data/gdb" arcpy.Union_analysis (["well_buff50", "stream_buff200", "waterbody_buff500"], "water_buffers", "NO_FID", 0.0003) arcpy.Union_analysis ([["counties", 2],["parcels", 1],["state", 2]], "state_landinfo")
The following stand-alone script shows two ways to apply the Union function in scripting.
# unions.py # Purpose: union 3 feature classes # Author: ESRI # Import the system modules import arcpy from arcpy import env # Set the current workspace # (to avoid having to specify the full path to the feature classes each time) env.workspace = "c:/data/data.gdb" # Union 3 feature classes but only carry the FID attributes to the output inFeatures = ["well_buff50", "stream_buff200", "waterbody_buff500"] outFeatures = "water_buffers" clusterTol = 0.0003 arcpy.Union_analysis (inFeatures, outFeatures, "ONLY_FID", clusterTol) # Union 3 other feature classes, but specify some ranks for each # since parcels has better spatial accuracy inFeatures = [["counties", 2],["parcels", 1],["state", 2]] outFeatures = "state_landinfo" arcpy.Union_analysis (inFeatures, outFeatures)