Intersect 3D (3D Analyst)

Summary

Computes the geometric intersection of two volumes defined by closed multipatch features, based upon the geometric intersection of their patches. Features or portions of features which overlap in the two layers and/or feature classes will be written to the Output Feature Class.

Learn more about how Intersect 3D works

Usage

Syntax

Intersect3D_3d (in_feature_class_1, {in_feature_class_2}, out_feature_class)
ParameterExplanationData Type
in_feature_class_1

The first set of multipatch features.

Feature Layer
in_feature_class_2
(Optional)

An optional second set of multipatch features to be intersected with the first.

Feature Layer
out_feature_class

The feature class to be created where the resulting features will be written.

Feature Class

Code Sample

Intersect 3D Example 1 (Python window)

The following Python Window script demonstrates how to use the Intersect 3D function in immediate mode.

import arcpy
from arcpy import env

env.workspace = 'C:/data'
arcpy.Intersect3D_3d('inMultipatch1.shp', 'outMultipatch.shp', 
                    'inMultipatch2.shp')
Intersect 3D Example 2 (stand-alone script)

The following Python script demonstrates how to use the Intersect 3D function in a stand-alone script.

'''****************************************************************************
Name: Intersect3D Example
Description: This script demonstrates how to use the
             Intersect3D tool
****************************************************************************'''
# Import system modules
import arcpy
import exceptions, sys, traceback
from arcpy import env

try:
    # Obtain a license for the ArcGIS 3D Analyst extension
    arcpy.CheckOutExtension('3D')
    # Set environment settings
    env.workspace = 'C:/data'
    # Set Local Variables
    inMP1 = 'Boston_MP_Small.shp'
    inMP2 = 'Boston_MP.shp'
    # Ensure output has a unique name
    outMP = arcpy.CreateUniqueName('Intersect.shp')
    
    # Execute Intersect 3D
    arcpy.Intersect3D_3d(inMP1, outMP, inMP2)

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

This tool does not use any geoprocessing environments

Licensing Information

ArcView: Requires 3D Analyst
ArcEditor: Requires 3D Analyst
ArcInfo: Requires 3D Analyst

6/10/2013