0

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

1

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.

  • Hey, its a graphic think. The green layer is consisting of a lot of small attributes 9like the red layer). The displaying of it is just as one. Thanks for the hint with the WITHIN tool. I understood it wrong. I though it selects everything that lays within and gets rid of everything else (like a clip would do it). I changed the selection method! But that alone did not do the job. I found a solution though and updated my question. I think the problem might have been that I worked on one feature layer with different selections. But that is just a guess? – Stophface Jul 14 '14 at 20:04
  • @Stophface I'm still not understanding what data your model is taking in and what it is trying to do. Or if you still have a question or the problem has been solved. It looks like red is just a mask and you're trying to address three separate selections of green within that mask. As I mentioned in my answer, no method of selecting by location will do this unless both layer's polygon boundaries are coincident - you need to use Overlay tools. Use of Clip, a single Union tool, or perhaps submodels seems like it would greatly simplify or clean things up. – Chris W Jul 14 '14 at 20:53
  • 1
    I recommend you try 'HAVE_THEIR_CENTER_IN' for the overlap_type of Select By Location. – klewis Jul 14 '14 at 23:18
0

One suggestion is to double check the projections of the layers you are working with to make sure they are the same. I see you wrote "All three of them have the same adjustment," not sure if that means projection or not.

I have had very strange things happen using files that line up in the data frame using projection on-the-fly, but are not actually set to the same projection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.