Skip to main content
Solved

Lines within polygon selection using NeighborFinder


fme_can_do_it
Enthusiast
Forum|alt.badge.img+9

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"?

View original
Did this help you find an answer to your question?

4 replies

DanAtSafe
Safer
Forum|alt.badge.img+17
  • 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+5
  • Supporter
  • June 14, 2024

 


liamfez
Influencer
Forum|alt.badge.img+34
  • 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+9
  • Author
  • Enthusiast
  • June 14, 2024

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings