I have 2 layers, point, and line. I want all the points to snapped to the nearest lines.

Effectively, at the end, all these points should now lie in the lines retaining all of their attributes. Is this possible?

  • 2
    What license level are you using? What have you tried?
    – PolyGeo
    Commented Nov 17, 2017 at 20:58
  • I have access to all the tools in ArcMap. I am using model builder to solve this with near tool. But, doesnot seem to work.
    – pnkjmndhl
    Commented Nov 17, 2017 at 21:30

2 Answers 2


Use the snap tool

Moves points or vertices to coincide exactly with the vertices, edges, or end points of other features. Snapping rules can be specified to control whether the input vertices are snapped to the nearest vertex, edge, or endpoint within a specified distance.

enter image description here

The Snap Environment parameter allows for the vertices of the input features to be snapped to the vertices, edges, and end points of multiple layers or feature classes. When multiple snapping rules are given, they are prioritized as follows: from top to bottom in the tool dialog or from left to right in scripting.

  • 2
    Note that this tool is not available with a Basic level license.
    – PolyGeo
    Commented Nov 17, 2017 at 22:21

I suppose another option would be to create a near table, do a join, then update the geometry of the point feature class to the XY result.

http://pro.arcgis.com/en/pro-app/tool-reference/analysis/generate-near-table.htm http://resources.arcgis.com/en/help/main/10.2/index.html#//00080000001q000000 <- 10.2 but should still be relevant

then something like


import arcpy  
from arcpy import env  

env.workspace = "C:/test.gdb"  

fc = "myPointFC"  

pnt = arcpy.Point()  

rows = arcpy.UpdateCursor(fc)  
for row in rows:  
    pnt.X = row.Near_X  
    pnt.Y = row.Near_Y  
    row.shape = pnt  

del row, rows

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.