HOW TO

Create connection lines between points and a line in ArcGIS Pro

Last Published: June 19, 2024

Summary

In ArcGIS Pro, connection lines can be created between a point feature class and a line feature class. This method can be useful when illustrating a connection between houses and their distance from a railway track.

The workflow provided creates connection lines between points and a line in ArcGIS Pro. The image below shows a point feature class and a line feature class on a map.

A point feature class and line feature class  on the map

Procedure

  1. Open the ArcGIS Pro project.
  2. Create a copy of the point feature class using the Export Features tool.
    1. Right-click the point feature class in the Contents pane and click Data > Export Features.
    2. In the Export Features window, select the point feature class for Input Features.
    3. Specify the output name for Output Feature Class and click OK. In this example, the new point feature class name is Stations and the layer is added to the map.
Note:
Hide the original point feature class from the map in the Contents pane to distinguish the feature class copy.
Configuring the Export Features window parameters
  1. Add a new field to the attribute table of the new point feature class and populate the field with the OBJECTID field values.
    1. Right-click the point feature class in the Contents pane and click Attribute Table.
    2. In the attribute table, click Add Field and specify a name.
    3. Click Save on the ArcGIS Pro ribbon.
    4. In the attribute table, right-click the newly created field and click Calculate Field.
    5. In the Calculate Field window, double-click OBJECTID in the Fields section. Click Apply and click OK.
Populating values into the newly created field using Calculate Field
  1. Use the Near tool to calculate the distance between each point in the point feature class to the closest point on the line feature class.
    1. On the ArcGIS Pro ribbon, click Analysis and click Tools.
    2. In the Geoprocessing pane, search for and select Near (Analysis Tools).
    3. For Input Features, select the point feature class.
    4. For Near Features, select the line feature class.
    5. Check the Location check box and click Run.
Configuring the Near tool parameters

The image below shows the point feature class attribute table with new fields displaying the distance and coordinates of each point’s nearest location on the line.

New fields in the attribute table displaying the distance and coordinates of the nearest points on the line
  1. Use the Make XY Event Layer tool to create point features based on the coordinates calculated using the Near tool (the points that fall on the line).
    1. In the Geoprocessing pane, search for and select Make XY Event Layer (Data Management Tools).
    2. For XY Table, select the point feature class.
    3. For X Field, select NEAR_X.
    4. For Y Field, select NEAR_Y.
    5. Specify the output name for Layer Name and click Run.
Note:
The output XY event layer is temporary and will not persist after the session ends. To change it to a permanent layer, export it to a feature class using the Export Features tool.
Configuring the Make XY Event Layer parameters

The image below shows the point features on the line indicating where the connection lines are to be made.

A new point feature class on the line
  1. Use the Append tool to append the new point features that fall on the line to the point feature class.
    1. In the Geoprocessing pane, search for and select Append (Data Management tools).
    2. For Input Datasets, select the output from Step 5. In this example, the PointsOnLine feature class is selected.
    3. For Target Dataset, select the point feature class.
    4. For Field Matching Type, select Skip and warn if schema does not match and click Run.
Configuring the Append tool parameters
  1. Use the Points To Line tool to create line features between the point feature class and the point features on the line.
    1. In the Geoprocessing pane, search for and select Points To Line (Data Management Tools).
    2. For Input Features, select the appended point feature class from Step 6. In this example, the Stations feature class is selected.
    3. Specify the output name for Output Feature Class.
    4. For Line Field, select the newly created field from Step 3. In this example, the ConnectionNum field is selected.
    5. Click Run.
Configuring the Points To Line tool parameters

The image below shows connection lines created between the point and the line feature classes on the map.

Connection lines between each point and the line feature class on the map
Note:
The additional layers created from this workflow (outputs from Steps 2 and 5) can be removed from the map and the original point feature class can be added to the map from the Contents pane.

Article ID: 000030465

Software:
  • ArcGIS Pro 3 1
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 9x

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