Hi! I'm trying to find which two areas are divided by a boundary (having the areas and boundaries in two separate featureclasses). Since we have no access to MapTopology in the Pro API, I'm instead trying to do a Search using SpatialQueryFilter. When I run the Select Layer By Location-tool I can choose 'Share a linesegment with' as a relationship. However, this option is not available as a SpatialRelationship for the SpatialQueryFilter. The nearest option is Touches, but this also finds the areas touched by only the endpoint of the line.
Does anyone have a solution for this? An other way of doing it? Or can I run the Select Layer By Location-tool from my code, and this will return the features I want?
Any input appreciated!
Ståle,
Norwegian Mapping Authority.
Hi
The best way to accomplish what you are trying to do right now is to execute the GP tool using Geoprocessing.MakeValueArray and Geoprocessing.ExecuteToolAsync.
https://pro.arcgis.com/en/pro-app/tool-reference/data-management/select-layer-by-location.htm
Thanks
Uma
Thanks for the reply, Uma!
I found another solution: find the midpoint of each boundary line, and use this point in SpatialFilter to find which areas is touched by this point.
Ståle.