I have two sets of points and I want to connect them to form lines by the id of the points. I.E. I have the following feature classes of points:


A1 222222  222222
A2 333333  333333


A1 222822  222222
A2 333933  333333

I want to create a line feature class that joins by ID, so one line for ID A1 and another line for ID A2. How can I achieve this?

  • I would do this using an arcpy.da.SearchCursor to read the end point values and simultaneously an arcpy.da.UpdateCursor @SHAPE token to create polyline geometries that join them together.
    – PolyGeo
    Nov 11, 2015 at 12:10

1 Answer 1


@PolyGeo's suggestion is the most elegant way of doing this, but if you are not familiar with arcpy/scripting in general, the steps given below should do the job:

  1. Create two point layers for each FC by using Make XY Event Layer
  2. Merge them by making sure you will have ID values in one field
  3. Use Point to Line tool (after ArcGIS 10.1) by selecting your ID field as Line Field (optional)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.