What I'm trying to do is this: I have a point that is snapped to an edge in ArcMap, and I'm using a SpatialFilter to find polyline and polygon features where the point intersects the interior of the geometry (polylines) or the boundary of the geometry (polygons). This strategy is not always working for the polygons.

I'm using a SpatialRelDescription of "*T*******" (i.e. where the interior of the point has a relationship with the boundary of the polygon) for the point-polygon comparison. Sometimes it finds the polygon feature sometimes it doesn't.

To get around this I'm buffering my point with a small radius and using that to execute the query which works, but is not ideal.

Does anyone have any idea why I'm finding my polygon features every time when using point geometry for comparison? Does this application of SpatialFilter just not work well? Am I setting it up wrong?

  • 1
    Point on line/boundary is not going to work well, as you've discovered; it's been like that for as long as I can remember (ArcObjects 8.3) - some will find the line and some wont. You're doing the right thing with a buffer around the points to select. Though I usually don't use SpatialRelDescription and stick with SpatialRelEnum::Intersects I can see you're trying to find the polygons that have a point on the boundary, again this has never worked well for me... I find all the polygons that intersect and then use IRelationalOperator on the boundaries of the polys to find the relationship. Commented Oct 13, 2016 at 21:45
  • Thanks Michael, I kind of thought that, at least I know I'm not going crazy and misunderstanding the documentation. I'll give the RelationalOperator method a go.
    – danielm
    Commented Oct 13, 2016 at 22:01
  • 2
    Mathematically speaking, it's nearly impossible for a point to be on a line unless it is exactly on an existing vertex (using the default coordinate reference XYSCALE for geographic coordinate systems only makes the problem harder). This is why using a small search circle is the canonical methodology for point/line searches (and has been for at least 28 years now -- to Arc/Info 4.0)
    – Vince
    Commented Oct 14, 2016 at 3:22


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.