Hi Everyone,
I have heard nested cursors are bad. Why is that? If I want to test if a point is in a particular polygon wouldn't I need nested cursors?
Something like this would work well. Why is nested cursors not a good idea? Thank you for your help
Luke Kaim
I have heard nested cursors are bad. Why is that? If I want to test if a point is in a particular polygon wouldn't I need nested cursors?
Something like this would work well. Why is nested cursors not a good idea? Thank you for your help
Code:
for row1 in arcpy.SearchCursor(shapefile1):
for row2 in arcpy.SearchCursor(shapefile2):
if row1.shape.contains(row2.shape):
return True