HOW TO

Create connection lines between a point and a line

Last Published: April 25, 2020

Summary

Instructions provided describe how to create 'connection lines' between a point feature class and a line feature class. This may be useful in situations where the distance from the line to a point is needed, or to illustrate a connection from a line to the nearest point.

Procedure

  1. Add the line and point feature classes to a blank map document.
  2. Export a copy of the original point feature class.
Note:
To make it less confusing, the original point feature class can be removed from the map.
  1. Right-click the original points feature in the Table of Contents and select Data > Export Data.
  2. Browse to a good output location and give it an appropriate name, such as 'Append_Points', and click Save.
  3. Click OK to export the data.
  4. Click Yes when prompted to add the exported data to the map as a layer.
  1. Open the attribute table for the point layer and add a new field. Name it something such as 'ConnectionNum'.
    • The field type can be a simple Short Integer with all the defaults.
  2. Right-click the new 'ConnectionNum' field name and open the Field Calculator.
  3. Double-click the ObjectID value and run the calculation to populate this new field with the ObjectID.
    • This serves as the value used to connect the original point to the point that falls on the line, created in the subsequent steps.
  4. Open the Near tool from the toolbox: Analysis Tools > Proximity > Near.
Note:
The Near tool is only available at the Advanced license level.
  1. Input Features is the point layer.
  2. Near Features is the line layer
  3. Specify the Search Radius (optional).
  4. Check the Location box.
  5. Check the Angle box.
  6. Click OK to run the tool.
[O-Image]
This populates the point feature class table with five additional fields:
  • Near_FID
  • Near_Dist
  • Near_X
  • Near_Y
  • Near_Angle
  1. Open the Make XY Event Layer tool from the toolbox: Data Management Tools > Layers and Table Views > Make XY Event Layer.
    1. XY Table is the point feature class
    2. X Field is Near_X
    3. Y Field is Near_Y
    4. Specify Z Field (Optional)
    5. Specify the output Layer Name or Table View, for example: 'Line_Points_Layer'.
    6. Specify a Spatial Reference (optional).
    7. Click OK to run the tool.
[O-Image]
This generates a new layer in the Table of Contents that displays the points calculated by the Near tool (the points that fall on the line).
  1. Open the Feature Class to Feature Class tool from the toolbox: Conversion Tools > To Geodatabase > Feature Class to Feature Class, to export the Line_Points_Layer XY Event layer to a feature class.
    1. Input Feature: Line_Points_Layer (layer made from Step 7d, above).
    2. Output Location: The location in which the output feature class is to be created.
    3. Output Feature Class: The name of the output feature class, such as Line_Points.
    4. Specify the Expression (optional).
    5. Specify any Field Map (optional).
    6. Click OK to run the tool.
[O-Image]
  1. Open the Append tool: Data Management Tools > General > Append.
    1. Input Datasets is Line_Points feature class (from Step 8c, above).
    2. Target Dataset is the Append_Points feature class (feature class from Step 2 above).
    3. Set the Schema Type to NO_TEST (optional), meaning the input dataset schema (field definitions) do not have to match that of the target dataset.
    4. Leave the Field Map as the default (optional); this controls how the attribute information in input datasets' fields is transferred to the target dataset.
    5. Specify the Subtype (optional).
    6. Click OK to run the tool.
[O-Image]
This appends both the original points and the points that fall on the line into one feature class.
  1. Open the Points to Line tool: Data Management Tools > Features > Points to Line.
    1. Input Features is the Append_Points (from Step 9, above).
    2. Specify a good Output Feature Class location and give it an appropriate name such as 'Connection_Lines'.
    3. Line Field is the ConnectionNum field.
    4. Specify the Sort Field (optional).
    5. Click OK to run the tool.
[O-Image]
This process creates the connection lines between the point and the line feature classes. The extra layers that were created throughout the steps can be removed from the map.

Article ID: 000011815

Software:
  • ArcMap

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options