Union (Analysis) |
|
Release 9.3
Last modified January 11, 2011 |
![]() ![]() ![]() Print all topics in : "Tools" |
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
Usage tips
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 will allow for identification of resulting areas that are completely enclosed by the resulting polygons. The FID attributes for these GAP features will all be -1.
This tool may generate multipart features in the input even if all inputs were single part. If multipart features are not desired, use the Multipart to Singlepart tool on the output.
When processing datasets that contain any individual feature with a very large number of vertices (e.g., hundreds of thousands to millions of vertices within a single feature), some geometric processing operations may run out of memory. For more details, see Geoprocessing with large datasets.
With ArcView and Editor licenses, the number of input feature classes or layers is limited to two.
The following environment settings affect this tool: Coordinate system, Extent, XY Tolerance, Z Tolerance, M Tolerance, XY Resolution, Z Resolution, M Resolution, Output XY domain, Output Z domain, Output M domain, Output has M values, Output has Z values, Default Z value, Configuration keyword, Output Spatial Grid.
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.
|
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.
|
Boolean |
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.
|
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.
|
Boolean |
# 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)