Inside 3D (3D Analyst)

License Level:BasicStandardAdvanced

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

Usage

Syntax

Inside3D_3d (in_target_feature_class, in_container_feature_class, out_table, {complex_output})
ParameterExplanationData 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.

  • Checked—The multipatch feature that contains an input feature will be identified.
  • Unchecked—The multipatch feature that contains an input feature will not be identified. This is the default.

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.

  • COMPLEXThe multipatch feature that contains an input feature will be identified.
  • SIMPLEThe multipatch feature that contains an input feature will not be identified. This is the default.
Boolean

Code Sample

Inside3D 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.Inside3D_3d('inFeature.shp', 'sample.gdb/multipatch', 'sample.gdb/output_table')
Inside3D example 2 (stand-alone script)

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)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires 3D Analyst
ArcGIS for Desktop Standard: Requires 3D Analyst
ArcGIS for Desktop Advanced: Requires 3D Analyst
11/8/2012