Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #point feature class
- pointFc = r"pointfeatureclass"
- #update table
- tab = r"updatetable"
- import arcpy
- #create dictionary
- di = {}
- #iterate point feature class and store values
- with arcpy.da.SearchCursor (pointFc, ["No", "x", "y"]) as curs:
- for no, x, y in curs:
- #store value
- di [no] = (x, y)
- #update table
- with arcpy.da.UpdateCursor (tab, ["No", "x", "y"]) as curs:
- for no, x, y in curs:
- #get value from dictionary
- x, y = di [no]
- row = (no, x, y)
- #update table
- curs.updateRow (row)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement