Select to view content in your preferred language

Intersect but don't just share a boundary

1116
7
07-28-2023 11:57 AM
Cheetah24
Emerging Contributor

Using the ArcGIS Pro SDK, how can I return a list of polygon features that intersect a feature in another layer but exclude those that just share a boundary. In addition, I would need to return any polygon that is spatially equivalent to the intersecting feature. I don't not want to change the selection set on the map, I just need a list. Thanks

0 Kudos
7 Replies
Aashis
by Esri Contributor
Esri Contributor

Have you looked into the options from  SpatialRelationship property of SpatialQueryFilter?  

If the available preset options are insufficient, you should create a Relate string following Dimensionally Extended Nine-Intersection Model (DE 9IM) and pass it to the SpatialQueryFilter as in the snippet.  

0 Kudos
Cheetah24
Emerging Contributor

Thank you for the response.  We are working at 3.04 until some bug fixes are released. This approach appears for 3.1 and above. Is there alternative for 3.0?

0 Kudos
CharlesMacleod
Esri Regular Contributor

it works in 3.0 (and 2.x as well for that matter)

0 Kudos
Cheetah24
Emerging Contributor

Any idea why I can't access Relation or SpatialRelationshipDescription ?

Cheetah24_0-1690811376584.png

 

0 Kudos
CharlesMacleod
Esri Regular Contributor

fully qualify SpatialRelationship. Something in your code is conflicting with it

0 Kudos
Cheetah24
Emerging Contributor

I have attempted that. I don't see it listed in the 3.0 documentation either. 

https://pro.arcgis.com/en/pro-app/3.0/sdk/api-reference/topic6828.html

 

 

0 Kudos
CharlesMacleod
Esri Regular Contributor

yes, i agree, looks like that particular enum value is not part of the GDB at 3.0. 

0 Kudos