The ArcGIS documentation for the Data Access Search Cursor states:
I understand that I could perform a search cursor with the attribute query and then use the geometry intersects method but this would be slow to have to loop through each feature.
How can I specify both these criteria when creating a search cursor?
أكثر...
The records returned by SearchCursor can be constrained to match attribute criteria or spatial criteria.
But I can't see any example of how to specify spatial criteria when calling the search cursor. For this example I have a geometry and wish to constrain the results of the search cursor to only features which both intersect that geometry and meet other attribute criteria.
I understand that I could perform a search cursor with the attribute query and then use the geometry intersects method but this would be slow to have to loop through each feature.
How can I specify both these criteria when creating a search cursor?
أكثر...