Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #point feature class
  2. pointFc = r"pointfeatureclass"
  3.  
  4. #update table
  5. tab = r"updatetable"
  6.  
  7. import arcpy
  8.  
  9. #create dictionary
  10. di = {}
  11.  
  12. #iterate point feature class and store values
  13. with arcpy.da.SearchCursor (pointFc, ["No", "x", "y"]) as curs:
  14. for no, x, y in curs:
  15. #store value
  16. di [no] = (x, y)
  17.  
  18. #update table
  19. with arcpy.da.UpdateCursor (tab, ["No", "x", "y"]) as curs:
  20. for no, x, y in curs:
  21. #get value from dictionary
  22. x, y = di [no]
  23. row = (no, x, y)
  24. #update table
  25. curs.updateRow (row)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement