Intersect 3D Line With Multipatch (3D Analyst)

Summary

Returns the number of geometric intersections between 3D line and multipatch features and also provides optional features that represent points of intersection and also divide the 3D lines at such points.

Illustration

Intersect 3D Line With Multipatch example

Usage

  • The intersection count will be returned in the message window and can be used in a model or script to establish preconditions for subsequent operations.

  • This tool determines the points of intersection in 3D Euclidian space. 2D line features are not supported by this tool, but 2D line features with height definitions stored in an attribute field can be converted to 3D by using Feature To 3D By Attribute.

  • The optional point output represents points of intersection between the input line and multipatch features and contains the following attributes:

    • LINE_OID—The OBJECTID of the original line along which the intersection was found.
    • MPATCH_OID—The OBJECTID of the multipatch which intersected the line at this location.
    • DIST_3D—The 3D distance along the original line at which the intersection was found.
  • The optional line output divides input line features at the points of intersection and contains the following attributes:

    • LINE_OID—The OBJECTID of the original line from which the new line was derived.
    • FROM_MP_ID—The OBJECTID of the multipatch feature that intersects the beginning of the line. A value of -1 is used to denote that the beginning of the line is not a point of intersection.
    • TO_MP_ID—The OBJECTID of the multipatch that intersects the end of the line. A value of -1 is used to denote that the beginning of the line is not a point of intersection.
      Note:

      If a line does not intersect with a multipatch, it is directly copied to the output and its FROM_MP_ID and TO_MP_ID fields will contain -1.

    • DIST_3D—The 3D distance along the original line at which an intersection was found and which represents the beginning of this new line.
    • LENGTH_3D—The 3D length of this new line. The sum of the lengths of each new line derived from an original line will be equal to the 3D length of that original line.
  • Attribute values from the original lines can be referenced in the optional output features through the use of output line feature class through the Join Attributes parameter.

Parameters

LabelExplanationData Type
Input Line Features

The line features that will be intersected with the multipatch features.

Feature Layer
Input Multipatch Features

The multipatch features that the lines will be intersected against.

Feature Layer
Join Attributes
(Optional)

The input line feature attributes that will be stored with the optional output features.

  • IDS_ONLY Only feature identification numbers will be stored. This is the default.
  • ALLAll attributes will be stored.
String
Output Points
(Optional)

Optional features that represent points of intersection between the 3D line and multipatch.

Feature Class
Output Lines
(Optional)

Optional line features that divide the input lines at each point of intersection with a multipatch feature.

Feature Class

Derived Output

LabelExplanationData Type
Intersection Count

The intersection count.

Long

arcpy.ddd.Intersect3DLineWithMultiPatch(in_line_features, in_multipatch_features, {join_attributes}, {out_point_feature_class}, {out_line_feature_class})
NameExplanationData Type
in_line_features

The line features that will be intersected with the multipatch features.

Feature Layer
in_multipatch_features

The multipatch features that the lines will be intersected against.

Feature Layer
join_attributes
(Optional)

The input line feature attributes that will be stored with the optional output features.

  • IDS_ONLY Only feature identification numbers will be stored. This is the default.
  • ALLAll attributes will be stored.
String
out_point_feature_class
(Optional)

Optional features that represent points of intersection between the 3D line and multipatch.

Feature Class
out_line_feature_class
(Optional)

Optional line features that divide the input lines at each point of intersection with a multipatch feature.

Feature Class

Derived Output

NameExplanationData Type
out_intersection_count

The intersection count.

Long

Code sample

Intersect3DLineWithMultipatch example 1 (Python window)

The following sample demonstrates the use of this tool in the Python window.

arcpy.env.workspace = 'C:/data'
arcpy.Intersect3DLineWithMultiPatch_3d('inLine.shp', 'inMultipatch.shp', 
                                     'IDS_ONLY', 'outPts.shp', 'outLine.shp')
Intersect3DLineWithMultipatch example 2 (stand-alone script)

The following sample demonstrates the use of this tool in a stand-alone Python script.

'''****************************************************************************
Name: Intersect3DLineWithMultiPatch Example
Description: This script demonstrates how to
             use the Intersect3DLine tool.
****************************************************************************'''
# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = 'C:/data'

# Set Local Variables
inLineFC = 'sample.gdb/lines_3d'
inMP = 'sample.gdb/test_MP'

# Ensure a unique name is produced for output files
outPoint = arcpy.CreateUniqueName('OutPt_3DIntersect', 'sample.gdb')
outLine = arcpy.CreateUniqueName('OutLine_3DIntersect', 'sample.gdb')

# Execute Intersect 3D Line with Multipatch
arcpy.Intersect3DLineWithMultiPatch_3d(inLineFC, inMP, 'IDS_ONLY',
                                       outPoint, outLine)

Related topics