I have a polygon that there are some partitions inside its boundary and some partitions outside its boundary. My question is how to select the partitions that are outside the boundary of the polygon? I know how to implement it in ArcGIS. I should use select by location and set the target to the layer that have partitions, set the source to the polygon layer and set the relation to "have their centroid in the source layer". But I can't find the corresponding spatial relation in spatial filter class when using ArcObjects and C#. The picture of my polygon and the partitions are as follows: enter image description here

  • Your image is confusing and you need to better explain. Are the partitions those light blue square boxes? If so, everyone of then is intersecting the dark blue boundary, there are no "outside" partitions. Unless the dark blue line is hiding an edge of the partitions that is exactly the blue line? We cannot tell. – Hornbydd Jun 7 '18 at 14:18
  • @Hornbydd The partitions are those rectangle boxes that are separated by the boundary of the polygon (blue line is the boundary of the polygon). So, they share boundary with the main polygon but they don't intersect. Half of them are inside the polygon and half of them are outside the polygon. – parastoo Jun 9 '18 at 11:56

Yes, Completely Outside does not seem to be one of the SpatialRel values. You should probably use the SpatialRelDescription property of ISpatialFilter instead.

I have only used this occasionally, and I'm not fluent in this area. However, I think that you want "FFFF**TT*". You may have to experiment.

Here's a link to the ArcObjects SDK page for SpatialRelDescription: https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#ISpatialFilter_SpatialRelDescription.htm

  • I think the one he wants is F*****T**. This should give every polygon that is outside of and/or borders the search geometry. – danielm Jun 7 '18 at 15:14
  • @Berend I tried different types of SpatialRelDescription but unfortunately non of them worked correctly. Maybe, it is due to the intersecting partitions at the corners. So, I used the spatial location of ArcGIS (have their centroid in) and then used switch selection and deleted those that were outside the polygon. It worked correctly but it is time consuming and I would like to perform it using ArcObjects – parastoo Jun 9 '18 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.