Union 3D (3D Analyst)

Summary

Merges closed, overlapping multipatch features from an input feature class.

Illustration

Union 3D tool illustration

Usage

  • Closed multipatch geometry is required for this analysis. The Is Closed 3D tool can be used to determine if a multipatch feature class contains closed features, and the Enclose Multipatch tool can be used to eliminate gaps in multipatch features.

  • This tool combines intersecting multipatch features encompassing overlapping volumes by keeping the outermost portions of the input features and removing the geometry that falls within the combined feature's interior. A separate table can be created to identify the source features that were merged together to create each combined output.

  • A grouping field can be used to identify features to be unioned, such as when multiple features represent parts of the same building. This can significantly improve performance by reducing the number of times the tool must iterate through the dataset. Rather than comparing a feature against all features, it is only compared against those that participate in its group.

  • When optimization is enabled, the tool attempts to automatically subset the features into groups by analyzing the bounding box for each feature. Disabling optimization can increase the tool's performance if a grouping field has been specified. Optimization can also be disabled in the absence of a grouping field if the desired output is to union all overlapping features into a single multipatch. Use caution when deciding how many features to aggregate, as very large and complex features may be created in the output feature class, which may exhibit poor display performance.

  • A warning stating that the resulting feature is not simple and could not be created is raised if two or more multipatch features share only an edge or a vertex. This message indicates that the features were not merged because they did not share a volume of space.

  • Textures and colors from the input multipatch features will not be preserved in the output.

Parameters

LabelExplanationData Type
Input Multipatch Features

The multipatch features that will be unioned.

Feature Layer
Output Feature Class

The output multipatch feature class that will store the aggregated features.

Feature Class
Grouping Field
(Optional)

The field that will be used to identify the features to group together.

Field
Disable Optimization
(Optional)

Specifies whether optimization will be performed on the input data. Optimization will preprocess the input data by grouping it to improve performance and create unique outputs for each set of overlapping features.

  • Unchecked—Optimization will be performed on the input data. The grouping field will be ignored. This is the default.
  • Checked—Optimization will not be performed on the input data. Features will either be stored in a single output feature or be unioned according to their grouping field, if one is provided.
Boolean
Output All Solids
(Optional)

Specifies whether the output feature class will contain all features or only the overlapping features that were unioned.

  • Checked—All input features will be written to the output. This is the default.
  • Unchecked—Only unioned features will be written to the output. Nonoverlapping features will be ignored.
Boolean
Output Table
(Optional)

A many-to-one table that identifies the input features that contribute to each output.

Table

arcpy.ddd.Union3D(in_feature_class, out_feature_class, {group_field}, {disable_optimization}, {output_all}, {out_table})
NameExplanationData Type
in_feature_class

The multipatch features that will be unioned.

Feature Layer
out_feature_class

The output multipatch feature class that will store the aggregated features.

Feature Class
group_field
(Optional)

The field that will be used to identify the features to group together.

Field
disable_optimization
(Optional)

Specifies whether optimization will be performed on the input data. Optimization will preprocess the input data by grouping it to improve performance and create unique outputs for each set of overlapping features.

  • ENABLEOptimization will be performed on the input data. The grouping field will be ignored. This is the default.
  • DISABLEOptimization will not be performed on the input data. Features will either be stored in a single output feature or be unioned according to their grouping field, if one is provided.
Boolean
output_all
(Optional)

Specifies whether the output feature class will contain all features or only the overlapping features that were unioned.

  • ENABLEAll input features will be written to the output. This is the default.
  • DISABLEOnly unioned features will be written to the output. Nonoverlapping features will be ignored.
Boolean
out_table
(Optional)

A many-to-one table that identifies the input features that contribute to each output.

Table

Code sample

Union3D example 1 (Python window)

The following sample demonstrates the use of this tool in the Python window.

import arcpy
from arcpy import env

env.workspace = 'C:/data'
arcpy.Union3D_3d('multipatch.shp', 'union_output.shp', 'GROUP_FIELD', 
                'DISABLE', 'ENABLE', 'UnionTable.dbf')
Union3D example 2 (stand-alone script)

The following sample demonstrates the use of this tool in a stand-alone Python script.

'''****************************************************************************
Name: Union3D Example
Description: This script demonstrates how to use the 
             Union3D tool.
****************************************************************************'''
# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = 'C:/data'

# Set Local Variables
inMP = "multipatch.shp"

# Ensure output multipatch has a unique name
outMP = arcpy.CreateUniqueName("union_output.shp")
outTbl = arcpy.CreateUniqueName("UnionTable.dbf")
GroupField = "Type"
optimize = "DISABLE"
solids = "ENABLE"

# Execute Union3D
arcpy.ddd.Union3D(inMP, outMP, GroupField, optimize, solids, outTbl)

Related topics