for row1 in arcpy.SearchCursor(shapefile1): for row2 in arcpy.SearchCursor(shapefile2): if row1.shape.contains(row2.shape): return True
Solved! Go to Solution.
I did not rule out a spatial join. When I solved this issue with tables I did use a spatial join. But joins do take a long time and I thought a cursor could be faster. Now I want to solve this issue programmatically. Why are nested cursors a bad idea?
I did not rule out a spatial join. When I solved this issue with tables I did use a spatial join. But joins do take a long time and I thought a cursor could be faster. Now I want to solve this issue programmatically. Why are nested cursors a bad idea?