Skip to main content
Solved

Lines within polygon selection using NeighborFinder

  • June 13, 2024
  • 4 replies
  • 99 views

fme_can_do_it
Enthusiast
Forum|alt.badge.img+12

I need to select the lines that fall entirely within a specific polygon and update their data with the respective polygon name. I attempted to use a spatial filter, but it didn't work as expected. When a line intersects two polygons, the filter selects and attributes the line to only one of the polygons, which is causing issues. I also tried using the NeighborFinder without success. I've attached a screenshot to illustrate a line segment that should not be selected within this polygon.

Best answer by DanAtSafe

Hi @fme_can_do_it Did you test with the spatial predicate "Filter OGC-Contains Candidate"?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

DanAtSafe
Safer
Forum|alt.badge.img+21
  • Safer
  • Best Answer
  • June 13, 2024

Hi @fme_can_do_it Did you test with the spatial predicate "Filter OGC-Contains Candidate"?


andrewj74
Supporter
Forum|alt.badge.img+7
  • Supporter
  • June 14, 2024

 


liamfez
Influencer
Forum|alt.badge.img+44
  • Influencer
  • June 14, 2024

I agree with @DanAtSafe and @andrewj74, you should check what test is being used.

If you were interested in the case that you mentioned, where a feature intersected 2 polygons, then I would recommend the SpatialRelator, it will give you a count of related features, and you can generate lists for those related features.


fme_can_do_it
Enthusiast
Forum|alt.badge.img+12
  • Author
  • Enthusiast
  • June 14, 2024

Thank you all for your help! The issue has been fixed.