Union

Title  Union

Summary

Ferramenta que executa união geométrica das feições de entrada. Conserva todas as feições e seus atributos no arquivo de saída.


Illustration

Union illustration Union illustration

Usage


Syntax

Parameter Explanation
out_feature_class (Optional)

The feature class that will contain the results.

join_attributes (Optional)

Determines which attributes from the input features will be transferred to the output feature class.All attributes—All the attributes from the input features will be transferred to the output feature class. This is the default. All attributes except feature IDs—All the attributes except the FID from the input features will be transferred to the output feature class. Only feature IDs—Only the FID field from the input features will be transferred to the output feature class.

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).

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, uncheck this parameter—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. Checked—No feature will be created for areas in the output that are completely enclosed by polygons. This is the default. Unchecked—A feature will be created for the areas in the output that are completely enclosed by polygons. This feature will have blank attributes and its FID values will be -1.

esri_out_feature_service_name (Optional)

The name of the optional feature service to create on the federated server containing the result of this tool. If no name is specified an output feature service will not be created.

Code Samples

Union example (Python window)

The following Python window script demonstrates how to use the Union function in immediate mode.


import arcpy
arcpy.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")

                    

Union example 2 (stand-alone script)

The following stand-alone script shows two ways to apply the Union function in scripting.


# unions.py
# Purpose: union 3 feature classes

# Import the system modules
import arcpy
 
# Set the current workspace 
# (to avoid having to specify the full path to the feature classes each time)
arcpy.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)

                    

Tags

Credits

Use limitations