I believe what I'm wanting to achieve is fairly simple... I'm wanting to create a field which basically says yes or no to whether or not the feature falls completely within another feature in a different shapefile.
I've tried using the spatial join function and it works in that it can distinguish whether or not it falls within another feature but the field doesn't say yes/no it has a value in.
the feature falls completely within another feature
When using Spatial Join, use the first group of features as target. In the Join Operation parameter, use JOIN_ONE_TO_MANY In the output, the Join_Count field will have 0 or 1: 0 means - False (the target is not completely within join feature) 1 means - True Let me know how it goes.
Thanks for replying! This was exactly what I was looking for. Is there any way I can make it say yes/no instead of 1/0? It's not essential but as its going to be published for non tech people it would be handy if it could be.
Add a new field of type Text (string) and then run Calculate field as show in the image below. Basically, you use a codeblock to set YES for 1 and NO for 0. I'm using Python here. Use the new field in the Field Name parameter. Expression:
if field == 0:
A less scripty way of doing this is simply to select features by location. Once they are selected you just calculate the field (yes) for everything that is selected. Then sort that field so that all the ones with a yes are grouped together. Then highlight everything without a yes and then calculate the field of those to say 'no'. Easy.