I have two types of point shapefiles. These two points are linked with another attribute table. Each Point from column A is linked to single/multiple values in column B. Each of these object_IDs have their respective coordinates in another table. eg.

 object_ID1   object_ID2
      1          3
      1          5
      1          9
      2          1
      3          7

where, each of these values represents the object id of the two different shape files. How to connect these two points with

  1. a line (eg. plot a line between 1 and 3, 1 and 5, 1 and 9)
  2. select the other value (eg. if I select one and run a python script (say), automatically select the other point/s)

The main objective is to visually link these two points anyway.

1 Answer 1


Use the Points to Line tool. The "Line Field" option is where you would input the ObjectID that you want lines made for.

Since your values are in different columns, we are going to want to put them in one column. Merge the tables together, so you have two tables in one. Add a field called LINE_ID, select all the records from the 1st table, calculate field with those records, select the second table, calculate field with those records. Now you have 1 field with BOTH values, use this as the input to the Line Field in the tool.

  • what if i have lat/lon of two points in a single table?
    – pnkjmndhl
    Commented Jan 4, 2016 at 19:41
  • 1
    Use the XY to Line tool in that instance.
    – Maksim
    Commented Jan 4, 2016 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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