Inside 3D (3D Analyst)
Summary
Determines if 3D features from an input feature class are contained inside a closed multipatch, and writes an output table recording the features that are partially or fully inside the multipatch.
Illustration
![Inside 3D tool graphic Inside 3D tool graphic](00q9/GUID-0D3FC423-F05A-493B-8C44-63ECEDA78AA8-web.png)
Usage
All input features must have Z information stored as part of their geometry. If field based height measurements are present in a 2D feature class, the Feature To 3D By Attribute tool can be used to create a 3D feature class.
-
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 is a 3D set operator that provides analytical functions on 3D features. See Working with 3D set operators for more information on what set operators are and how to use them.
-
If the Complex Output Table option is selected, a record is created for each multipatch that a given input feature intersects. A feature may fall within multiple closed multipatch features and have multiple entries in the output table.
-
The following fields are present in the output table:
- Target_ID—The unique ID of the input feature.
- Status—Indicates if the feature identified by the Target_ID field is inside or partially inside a multipatch.
- Contain_ID—Identifies the unique ID of the multipatch that intersects the input features are inside or partially inside. Only included if the Complex Output Table option is selected
Syntax
Parameter | Explanation | Data Type |
in_target_feature_class |
The input multipatch or 3D point, line, or polygon feature class. | Feature Layer |
in_container_feature_class |
The closed multipatch features that will be used as the containers for the input features. | Feature Layer |
out_table |
The output table providing a list of 3D Input Features that are inside or partially inside the Input Multipatch Features which are closed. The output table contains an OBJECTID (object ID), Target_ID, and Status. The Status will state if the input feature (Target_ID) is inside or partially inside a multipatch. | Table |
complex_output (Optional) |
Specifies if the output table will identify the relationship between the Input Features and the Input Multipatch Features through the creation of a Contain_ID field that identifies the multipatch feature that contains the input feature.
Specifies if the output table will identify the relationship between the Input Features and the Input Multipatch Features through the creation of a Contain_ID field that identifies the multipatch feature that contains the input feature.
| Boolean |
Code Sample
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.Inside3D_3d('inFeature.shp', 'sample.gdb/multipatch', 'sample.gdb/output_table')
The following sample demonstrates the use of this tool in a stand-alone Python script:
'''****************************************************************************
Name: Inside3D Example
Description: This script demonstrates how to use the
Inside3D 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
inFC = 'Points_3D.shp' # the input feature
inMP = 'Buildings.shp' # the input multi-patch
# Ensure output has a unique name
outTbl = arcpy.CreateUniqueName('Output_Table.dbf')
# Execute Inside 3D
arcpy.Inside3D_3d(inFC, inMP, outTbl)
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)