Inside 3D (3D Analyst)
Summary
Tests each feature to determine if it falls inside a multipatch. If it falls inside a multipatch feature, it writes an entry to a new table indicating which feature it fell within.
Illustration
Usage
-
Requires input features, which must have closed multipatch geometry.
-
Only closed multipatches can be used for the analysis.
-
A feature may fall within multiple closed multipatch features and have multiple entries in the output table.
Inside 3D is a 3D set operator as part of the 3D Features toolset. See Working with 3D set operators for more information on what set operators are and how to use them.
-
The following fields are present in the output table:
- OBJECTID: The OBJECTID of the field.
- Target_ID: The OBJECTID of the original feature(s).
- Status: Indicates if the input feature (Target_ID) is inside or partially inside a multipatch.
-
The following fields are present in the output table when the Complex Output Table option is selected:
- OBJECTID: The OBJECTID of the field.
- Target_ID: The OBJECTID of the original feature.
- Status: Indicates if the input feature (Target_ID) is inside or partially inside a multipatch.
- Container_ID: The Container_ID represents the exact multipatch which the input features are inside or partially inside.
Syntax
Parameter | Explanation | Data Type |
in_target_feature_class |
The z-enabled point, line, polygon, or multipatch features. | Feature Layer |
in_container_feature_class |
The multipatch features. The multipatches must be closed. Use the Is Closed 3D tool to determine if the multipatches are closed. | 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) |
The Complex Output Table option modifies the output table to include information about the relationship between the Input Features and the Input Multipatch Features. This allows you to identify which features fell inside or partially inside specific closed multipatches. When it's checked on, then the output table will have an extra Container_ID displayed, along with the Target_ID information. This Container_ID represents the exact multipatch which the input features (Target_ID) are inside or partially inside. | Boolean |
Code Sample
The following Python Window script demonstrates how to use the Inside 3D function in immediate mode.
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 Python script demonstrates how to use the Inside 3D function in a stand-alone 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)