Intersect 3D Lines (3D Analyst)

Summary

Computes the intersecting and overlapping segments of lines in 3D space.

Usage

  • The tool works on a pairwise basis. If more than two lines intersect, the number of output points will be the mathematical combination of the intersecting lines. For example, three intersecting lines will produce three output points—one for the first and second intersection, another for the first and third intersection, and another for the second and third intersection. Likewise, if four input lines intersect, six output points will be produced—one each for the first and second, the first and third, the first and fourth, the second and third, the second and fourth, and the third and fourth.

  • Input features must have a spatial index. Use the Add Spatial Index tool to create a new index (particularly for shapefiles) or rebuild an existing index if there is any doubt about it being correct.

  • If 2D lines are provided as input, all vertices are assumed to be at elevation zero.

  • When two lines with different z-values intersect because of the allowed vertical tolerance for detecting intersections, the output point will use the higher of the two elevations. Similarly, when two line segments with different z-values intersect, the output line feature will be based on the segments with the higher z-values.

  • Some output lines may consist of multiple parts due to two input lines with multiple, discontinuous overlapping sections or lines getting closer and farther apart in the z-direction.

  • When attributes are transferred to the output, the values placed into the first set of fields are from the first input line, and the values in the second set of fields are from the second input line. If two input line feature layers are specified, the first and second input lines are from the first and second input line feature layers, respectively. If only one input line feature layer is specified, the rule is the same, except that the columns appear to be repeated.

  • The output point features will include the following attribute fields:

    • I3L_TYPE—A value of 0 indicates the point marks the end point of the overlapping line segment, whereas a value of 1 indicates the point is an intersection of two lines.
    • I3L_GROUP—A unique value that identifies all points that share the same position in horizontal space.
    • I3L_OID1—The feature ID of the first intersecting line feature.
    • I3L_OID2—The feature ID of the second intersecting line feature.
    • I3L_LINE1Z—The Z value of the intersection point on the first line.
    • I3L_LINE2Z—The Z value of the intersection point on the second line.
    • I3L_Z_DIFF—The difference in Z between the two input lines at the XY location of the intersection.

Parameters

LabelExplanationData Type
Input Features

The line features that will be evaluated for intersections. The input can consist of either one or two line feature layers or classes. If one input is specified, each feature will be compared with all other features in that feature class. No feature will be compared to itself.

Feature Layer
Maximum Z Difference
(Optional)

The maximum vertical distance between line segments that intersect.

Linear Unit
Attributes To Join
(Optional)

Specifies which attributes from the input features will be transferred to the output feature class.

  • All attributesAll the attributes from the input features will be transferred to the output feature class. This is the default.
  • All attributes except feature IDsAll the attributes except the FID from the input features will be transferred to the output feature class.
  • Only feature IDsOnly the FID field from the input features will be transferred to the output feature class.
String
Output Point Feature Class
(Optional)

The output points representing the locations where the input lines intersect, including locations where overlapping line segments begin and end.

Feature Class
Output Line Feature Class
(Optional)

The output lines representing the overlapping sections that exist between the input lines.

Feature Class

Derived Output

LabelExplanationData Type
Output Intersection Count

The number of intersecting locations in the input lines.

Long

arcpy.ddd.Intersect3DLines(in_lines, {max_z_diff}, {join_attributes}, {out_point_fc}, {out_line_fc})
NameExplanationData Type
in_lines
[in_lines,...]

The line features that will be evaluated for intersections. The input can consist of either one or two line feature layers or classes. If one input is specified, each feature will be compared with all other features in that feature class. No feature will be compared to itself.

Feature Layer
max_z_diff
(Optional)

The maximum vertical distance between line segments that intersect.

Linear Unit
join_attributes
(Optional)

Specifies which attributes from the input features will be transferred to the output feature class.

  • ALLAll the attributes from the input features will be transferred to the output feature class. This is the default.
  • NO_FIDAll the attributes except the FID from the input features will be transferred to the output feature class.
  • ONLY_FIDOnly the FID field from the input features will be transferred to the output feature class.
String
out_point_fc
(Optional)

The output points representing the locations where the input lines intersect, including locations where overlapping line segments begin and end.

Feature Class
out_line_fc
(Optional)

The output lines representing the overlapping sections that exist between the input lines.

Feature Class

Derived Output

NameExplanationData Type
out_intersection_count

The number of intersecting locations in the input lines.

Long

Code sample

Intersect3DLines example (Python window)

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

import arcpy
arcpy.env.workspace = 'C:/data'
arcpy.ddd.Intersect3DLines(['floor_centerlines.shp', 'stairs.shp'], '2 Meters', 
                           'ONLY_FID', 'intersection_pts.shp')

Licensing information

  • Basic: Requires 3D Analyst or ArcGIS Location Referencing
  • Standard: Requires 3D Analyst or ArcGIS Location Referencing
  • Advanced: Requires 3D Analyst or ArcGIS Location Referencing

Related topics