I have a line
layer and point
layer on my ArcGIS project. The points are on the lines. I want to create vertex on lines at this point coordinates.
import arcpy
point_rows = arcpy.da.SearchCursor("D:\Test.gdb\MyPoints", ['OID@', 'SHAPE'])
rows = arcpy.UpdateCursor("D:\Test.gdb\MyLines")
for row in rows:
geom = row.SHAPE
for part in geom.getPart():
for pnt in point_rows:
row.X = pnt.X
row.Y = pnt.Y
rows.updateRow(row)
I could not add vertex on points, if point is on the line. How can I do this using arcpy?
No comments:
Post a Comment