Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fc1 = ur'D:polygons1.shp'
- fc2 = ur'D:polygons2.shp'
- fields = ['SHAPE@','code']
- with arcpy.da.UpdateCursor(fc1,fields) as cur1:
- with arcpy.da.SearchCursor(fc2,fields) as cur2:
- for row1 in cur1:
- for row2 in cur2:
- row1[1] = row2[1] if(row1[0]==row2[0]) else ''
- cur1.updateRow(row1)
Add Comment
Please, Sign In to add comment