What could cause a Spatial Join (Completely Within) to return false positives?

1210
6
06-13-2019 11:50 AM
EnvironmentalIntelligence
New Contributor III

I have a large feature class of survey areas that I need to Spatial Join to a target Feature Class of buffered work locations to find locations that are Completely Within a survey. This is part of a large model I have created for our team, but my coworker noticed it is returning some join features that do not contain the target features. What's more strange, is that when I switched the join option to just Within, which should be less limited in scope, these false positives disappear, although now I am left with other unwanted target features where work areas and surveys just partially overlap.

What could cause this strange error?

I have run the repair geometry tool on both feature classes involved. Are there other geometry errors that could be causing this?

The image below shows the two work areas that are falsely returning information as if they were entirely within the survey area in orange.

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

The orange area seems to be a multipart feature.

I would confirm with an 'intersect' to check the behaviour.

I am wondering if 'completely within' is being interpreted as within the 'extent' rather than within the 'geometry'.

The subtle difference in definitions is listed here for reference

Select By Location: graphic examples—Data Management toolbox | ArcGIS Desktop 

  • Within - Selects features in the input feature layer within or contained by features in the selecting features layer.
  • Completely within - The result is identical to Within except when the feature in the input feature layer intersects the boundary of the feature in the selecting features layer; then it is not selected.
  • Within Clementini - The result is identical to Within except when the entirety of the feature in the input feature layer is on the boundary of the feature in the selecting features layer. Clementini states that the boundary of a point is always empty, and the boundary of a line is the endpoints.
EnvironmentalIntelligence
New Contributor III

Yes it is a multipart feature. I tested an intersect and no results were returned, which is correct.

Should I not use Completely Within with multipart features? The description does not mention that it considers extent any different than Within would.

0 Kudos
DanPatterson_Retired
MVP Emeritus

The only thing that the 'completely's offer is the boundary reference.  It sounds in your case that 'within' is sufficient and equivalent to 'intersect'.  The ramifications of a partial overlap just reflects the reality.  The question that will guide you is what do you want to do with those cases.  If you want them to go away, choose the selection method to match.  If those selected features belong to two selection areas then they represent overlap and you could isolate those for further consideration or inclusion in two sampling areas rather than the nice clean 'one'. 

On the side note, the multipart geometry could be converted to singlepart.  Rerun your selection to make the geometry 'clean' and combine your 'completely within' the parts to see what happens.

EnvironmentalIntelligence
New Contributor III

Thanks Dan,

I cannot make the surveys single part because the survey layer is continuously updated and accessed by several people who want one row per survey for simplicity in record keeping. I have changed the method to Within_Clementini, which has removed these false positives, and will just have to select and remove cases of partial overlap. It still seems nonsensical to me that the Completely_Within gets thrown off my the extent of Multipart Features while Within and Within_Clementini do not.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

What product and version are you using, e.g., ArcMap or ArcGIS Pro, and 10.6.x or 10.7?  What is the back-end data store, e.g., file geodatabase, shapefile, etc...?

Is the issue isolated to some of your multipart polygons or just a couple that have work areas in them like your example?  Can you replicate the problem if you create some fictitious/sample polygons?

0 Kudos
EnvironmentalIntelligence
New Contributor III

Arcmap 10.3. Both feature classes are in file geodatabases. The issue is happening with several different work areas, all are between separate pieces of multipart polygons. I briefly tried to replicate and could not.

0 Kudos