I have a set of overlapping polygons and a line of points. A single points can fall within any number of polygons, and I need to determine the attribute values of points that fall within each polygon.
My outlined workflow was:
- Select each polygon individually using SelectLayerByAttribute_management
- Select the points which fall within that selected polygon using SelectLayerByLocation_management
- Iterate through the selected points and extract their attribute values using SearchCursor
The issue I'm running into is that according to this post the polygons for step 1 have to be a "layer" rather than a feature class or shapefile. However for step 2, the polygons cannot be "layers" and have to be a feature class or shapefile.
I was relying on the selection of the polygon features in step 1 and 2 to to be the same. This works inside of ArcMap using the Python console, but I am unable to produce more than the first line.