I used the function "SelectLayerByLocation_management" with parameter "SHARE_A_LINE_SEGMENT_WITH" to select Grid polygon by using the line (refer to the attached picture for details). However, just only polygon A is selected but not both polygon A and B are selected. Polygon A and Polygon B have a common edge. Does anyone know the reason? If I want to select polygon A and polygon B by using the red line (common edge), what syntax I should use? Thanks.
Solved! Go to Solution.
the main link Select Layer By Location—Help | ArcGIS for Desktop
the select within layer link Select By Location: Select based on spatial relationship within the layer—Help | ArcGIS for Desktop
I would have expected a different outcome given your input unless your boundary were a segmented polyline, I would have expected the surrounding to be selected not just the boundary you want
the main link Select Layer By Location—Help | ArcGIS for Desktop
the select within layer link Select By Location: Select based on spatial relationship within the layer—Help | ArcGIS for Desktop
I would have expected a different outcome given your input unless your boundary were a segmented polyline, I would have expected the surrounding to be selected not just the boundary you want
Thanks Dan. I found that the selection result will be what I expected if I extracted few Grid polygons to another new GDB for selection. I think the problem is caused by my master layer.