Guest User

Untitled

a guest
Oct 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. fc1 = ur'D:polygons1.shp'
  2. fc2 = ur'D:polygons2.shp'
  3. fields = ['SHAPE@','code']
  4. with arcpy.da.UpdateCursor(fc1,fields) as cur1:
  5. with arcpy.da.SearchCursor(fc2,fields) as cur2:
  6. for row1 in cur1:
  7. for row2 in cur2:
  8. row1[1] = row2[1] if(row1[0]==row2[0]) else ''
  9. cur1.updateRow(row1)
Add Comment
Please, Sign In to add comment