[GIS] Select Layer by location does not work

arcgis-desktopfeature-layermodelbuilderselect-by-locationshapefile

I am having trouble using the "Select Layer by Location" tool.
I want to select everything from shapefile A (green) that overlays with Shapefile B (red).

Here is the raw data:

raw

And one example of the "Select Layer by location" (all three of them have the same adjustment, just different input):

adjusments

Running this, it produces the following output.

output

In a closeup one can see a few selections. But based on the input data (red – as you can see, it basically covers all of the green area) it should be exactly the same. Or am I totally mistaken?

closeup

EDIT 7/14/14 4:58pm

This is how it worked out.
Instead of making one feature layer I made three feature layers and three different selection which need to be saved seperately. Another step was copying the features before merging them. Dont be confused, I added another step to the model (calculate field) but this has nothing to do with the trouble shooting of the original problem.

solution http://s14.postimg.org/6hltytbf9d/Untitled.png

Best Answer

I'm guessing based on your final image that while the green does provide 100% coverage, it is broken up into separate polygons - otherwise (if it were a single giant polygon) you'd be getting nothing selected.

The problem is your Relationship choice. Within means that only whole polygons (not areas or parts of polygons) from layer A that lie within a polygon from layer B will be selected. You may want to review the tool help file and read through the relationship options (overlap type) for a better understanding of what they do. There are also some graphic examples here.

Further, because (it appears) the two polygon layers don't share coincident boundaries, if what you're wanting to do is create a feature class out of green that compeletely matches red, Select Layer by Location or even Select by Location isn't going to work and you need a different tool. One option would be to Clip the green using the red as clip features.

Your symbology doesn't indicate if each polygon might have differing attributes. If not, you may want to run a Dissolve on the layers first to simplify their geometry. If they do have differing attributes and those need to be preserved, and especially if you're trying to combine those different layers into one while keeping individual attributes as that Merge tool might indicate, you may want to look at the Intersect and Union tools.

If you can edit your question to be more detailed about the data you're working with and what you're trying to do, I might be able to edit this answer down to more specific information and suggestions. The model is somewhat difficult to follow with default names, and while I can't see the entire model I'm curious about the raster to polygon operation and where it falls in the process.

Related Question