Select to view content in your preferred language

Spatial Queries in ArcEngine (and ArcReader)

794
0
06-14-2011 06:53 AM
TomHart
Deactivated User
I'm executing a spatial query using the geometry of a polygon feature using the esriSpatialRelWithin spatial relation to find out what feature it is contained within in another polygon layer.

In ArcEngine I am getting 1 result and in ArcReaderControl I am getting 0 results - on the same map, same feature.

I then tried using esriSpatialRelIntersects and I get 4 results in both ArcReader and ArcEngine.  I take this to mean that my query geometry shares borders (because there are three other polygons that border the feature in the layer I am querying).  But if that is the case why is ArcEngine returning 1 result when I use esriSpatialRelWithin?  Shouldn't it return 0 results like the ArcReaderControl?

The next thing I tried was using eriSpatialRelRelation (in ArcEngine) and I set the relation description to TF**F**** which I took off this page (http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriGeoDatabase/ISpatialFilter_SpatialRe...) which is supposed to be the equivalent of esriSpatialRelWithin and it returns 0 results.

Can anyone provide some insight into this?
0 Kudos
0 Replies