Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Analysis toolbox > Overlay toolset > Tools

Union (Analysis)

Release 9.3
Last modified January 11, 2011
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

NOTE: This topic was updated for 9.3.1.


Computes a geometric intersection of the Input Features. All features will be written to the Output Feature Class with the attributes from the Input Features, which it overlaps.

Learn more about how Union works.


Illustration


Union illustration

Usage tips

Command line syntax
An overview of the Command Line window
Union_analysis <in_features {Ranks};in_features {Ranks}...> <out_feature_class> {NO_FID | ONLY_FID | ALL} {cluster_tolerance} {GAPS | NO_GAPS}

Parameter Explanation Data Type
<in_features {Ranks};in_features {Ranks}...>

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 the Input Features must be polygons. With ArcView and ArcEditor licenses, the number of input feature classes or layers is limited to two.

(Feature Layer Long; Feature Layer Long;...)
<out_feature_class>

The feature class that will contain the results.

Feature Class
{NO_FID | ONLY_FID | ALL}

Determines which attributes from the Input Features will be transferred to the Output Feature Class.

  • ALL — All the attributes from the Input Features will be transferred to the Output Feature Class. This is the default.
  • NO_FID — All the attributes except the FID from the Input Features will be transferred to the Output Feature Class.
  • ONLY_FID — Only the FID field from the Input Features will be transferred to the Output Feature Class.

String
{cluster_tolerance}

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). You can set the value to be higher for data that has less coordinate accuracy and lower for datasets with extremely high accuracy.

Linear unit
{GAPS | NO_GAPS}

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.

  • GAPS — No feature will be created for areas in the output that are completely enclosed by polygons. This is the default.
  • NO_GAPS — A feature will be created for the areas in the output that are completely enclosed by polygons. This feature will have blank attributes.

Boolean
Data types for geoprocessing tool parameters


Command line example

union_analysis "well_buff50; stream_buff200; waterbody_buff500" water_buffers NO_FID 0.0003

union_analysis (counties 2; parcels 1; state 2) state_landinfo

Scripting syntax
About getting started with writing geoprocessing scripts
Union_analysis (in_features, out_feature_class, join_attributes, cluster_tolerance, gaps)

Parameter Explanation Data Type
in_features (Required)

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 the Input Features must be polygons. With ArcView and ArcEditor licenses, the number of input feature classes or layers is limited to two.

(Feature Layer Long; Feature Layer Long;...)
out_feature_class (Required)

The feature class that will contain the results.

Feature Class
join_attributes (Optional)

Determines which attributes from the Input Features will be transferred to the Output Feature Class.

  • ALL — All the attributes from the Input Features will be transferred to the Output Feature Class. This is the default.
  • NO_FID — All the attributes except the FID from the Input Features will be transferred to the Output Feature Class.
  • ONLY_FID — Only the FID field from the Input Features will be transferred to the Output Feature Class.

String
cluster_tolerance (Optional)

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). You can set the value to be higher for data that has less coordinate accuracy and lower for datasets with extremely high accuracy.

Linear unit
gaps (Optional)

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.

  • GAPS — No feature will be created for areas in the output that are completely enclosed by polygons. This is the default.
  • NO_GAPS — A feature will be created for the areas in the output that are completely enclosed by polygons. This feature will have blank attributes.

Boolean

Data types for geoprocessing tool parameters


Script example

# Create the geoprocessor
import arcgisscripting
gp = arcgisscripting.create()

# Set the current workspace (to avoid having to specify the full path to the feature classes each time)
gp.Workspace = "c:/test_data"

try:
    # Union 3 feature classes but only carry the FID attributes to the output
    gp.union_analysis("well_buff50; stream_buff200; waterbody_buff500", "water_buffers", "ONLY_FID", 0.0003)

    # Union 3 other feature classes, but specify some ranks for each since parcels has better spatial accuracy
    gp.union_analysis("counties 2; parcels 1; state 2", "state_landinfo")

except:
    # If an error occurred when running Union, print out the error message.
    print gp.GetMessages(2)

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.