ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Union 3D

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

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

Illustration

Union 3D

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.

  • Multipatch features encompassing overlapping volumes are combined by intersecting the shells of the features and removing redundant interior portions. This process occurs iteratively until all multipatch features in the feature class have been processed.

  • A grouping field can be used to identify features to be unioned, such as when the multipatches represent building parts in a city where multiple features represent one 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. The same message is returned if a group contains multipatches that share no volume or space.

  • An optional table can be created to identify the attributes of the source features that were unioned to create each unioned output.

    Note:

    A relationship between the table and the output feature class can be established to query the attributes associated with the source features. Please see Relating the attributes in one table to another for more information.

Syntax

arcpy.ddd.Union3D(in_feature_class, out_feature_class, {group_field}, {disable_optimization}, {output_all}, {out_table})
ParameterExplanationData 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 used to identify the features that should be grouped together.

Field
disable_optimization
(Optional)

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

  • ENABLE —Optimization is enabled, and the grouping field is ignored. This is the default. This is the default.
  • DISABLE —No optimization is 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)

Determines if the output feature class contains all features or only the overlapping ones that were unioned.

  • ENABLE —All input features are written to the output. This is the default.
  • DISABLE —Only unioned features are written to the output. Non-overlapping 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

arcpy.CheckOutExtension('3D')
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
import exceptions, sys, traceback
from arcpy import env

try:
    arcpy.CheckOutExtension('3D')
    # Set environment settings
    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)
    arcpy.CheckInExtension('3D')


except arcpy.ExecuteError:
    print arcpy.GetMessages()
except:
    # Get the traceback object
    tb = sys.exc_info()[2]
    tbinfo = traceback.format_tb(tb)[0]
    # Concatenate error information into message string
    pymsg = 'PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}'\
          .format(tbinfo, str(sys.exc_info()[1]))
    msgs = 'ArcPy ERRORS:\n {0}\n'.format(arcpy.GetMessages(2))
    # Return python error messages for script tool or Python Window
    arcpy.AddError(pymsg)
    arcpy.AddError(msgs)

Environments

  • Current Workspace
  • Extent
  • Output Coordinate System
  • Geographic Transformations
  • Output CONFIG Keyword
  • Auto Commit
  • Output XY Domain
  • Output Z Domain

Licensing information

  • Basic: Requires 3D Analyst
  • Standard: Requires 3D Analyst
  • Advanced: Requires 3D Analyst

Related topics

  • An overview of the 3D Features toolset
  • About 3D features
  • Fundamentals of geoprocessing with the ArcGIS 3D Analyst extension
  • Working with 3D set operators
  • How to import an existing 3D model into a multipatch feature class
  • Multipatches
  • Import 3D Files

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal