Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import arcpy,os
  2.  
  3. fc_to_clip=r'C:TEST.gdbpolygons123'
  4. clipfeatures=r'C:TEST.gdbclip_features'
  5. out_location=r'C:TEST.gdb'
  6.  
  7. with arcpy.da.SearchCursor(clipfeatures,['OBJECTID','SHAPE@']) as cursor:
  8. for row in cursor:
  9. print row[0]
  10. arcpy.Clip_analysis(in_features=fc_to_clip, clip_features=row[1],out_feature_class=os.path.join(out_location,'Clip_'+str(row[0])))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement