I am using ArcMap

I have hundreds of points as a point shape file and also a polyline feature class as another shape file.

Problem: I need to know two most nearest polyline IDs to each point.

What I tried to do but was not successful:

1- Near tool:

I know that Near tool in the Proximity toolbox of ArcMap software can find the nearest polyline feature to each point.

But what if I need two first nearest features. I mean if we rank all features in the polyline to each point, I need first two of them (not only the first which is the nearest).

2- Other ideas

I thought of ideas like buffering each points and then interact the buffer with polyline features to see IDs of intersecting polylines. but I couldn't implement it in the software.

  • 1
    Generate Near table tool designed for this.
    – FelixIP
    Commented Dec 20, 2022 at 18:21

1 Answer 1


Generate Near Table tool can achieve that for you. Make sure you enter closest count as 2 considering you want two first nearest features. The output table will contain the distances and locations of the two nearest polyline features to each point. You can then join the output table to your point layer and use the fields in the table to symbolize the points based on the nearest polyline features.

Refer here for more details: https://desktop.arcgis.com/en/arcmap/10.3/tools/analysis-toolbox/generate-near-table.htm

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.