Good morning!
I'm trying to get this spatial query right, and as per the subject above, whats the difference between SPATIAL_REL_CONTAINS or SPATIAL_REL_INTERSECTS? If spatial_rel_contains is for one polygon that's completely contained in another polygon, why does the description read "Part or all of a feature from feature class 1 is contained within a feature from feature class 2." ? Here's why I ask this....
I have a parcel geometry. I'm trying to find out what survey area its in using the survey area geometry. Well, when I use intersects, I'm getting 4 different survey areas. It should only be showing one survey area that its in. Here's the rub. When I use contains instead of intersects, it doesn't find ANY SURVEY AREAS. Isn't contains supposed to be able to allow for partial contains? Here's how I'm putting my function together (I know I have the contains commented out. So right now its using intersects and not contains):
Solved! Go to Solution.
Dean,
They are pretty much what their title suggests. SPATIAL_REL_CONTAINS means the whole feature has to be contained inside of other geometry where as SPATIAL_REL_INTERSECTS means any portion of the geometry can intersect (touch) the other geometry.
Dean,
They are pretty much what their title suggests. SPATIAL_REL_CONTAINS means the whole feature has to be contained inside of other geometry where as SPATIAL_REL_INTERSECTS means any portion of the geometry can intersect (touch) the other geometry.
What threw me in the description of the SPATIAL_REL_CONTAINS, it says "Part or all of a feature from feature class 1...". So I just ended up using the intersects relationship and just adding a negative buffer of a foot to the geometry I was using. It seems to work ok now. Thanks for clearing that up for me though, Robert. I think ESRI needs to update the description of SPATIAL_REL_CONTAINS.
--Dean