Skip to main content
Question

Loop through feature class to select polygons


fme_can_do_it
Enthusiast
Forum|alt.badge.img+11

I am reading the polygon and Lines dataset in FME. I need to select lines that are intersecting a polygon and populate the polygon name in Lines. I have used tester after feature to filter one polygon and select intersecting lines using a spatial filter. Is there a way to loop through a polygon feature and select one polygon at a time in FME, Instead of entering the Polygon name in a tester every time.

 

image 

5 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • August 10, 2022

What is the function of the tester here? Why can't you send all polygons to the filter port?


fme_can_do_it
Enthusiast
Forum|alt.badge.img+11
  • Author
  • Enthusiast
  • August 10, 2022
ebygomm wrote:

What is the function of the tester here? Why can't you send all polygons to the filter port?

tester is reading one polygon at a time, here is a screenshot below:

image 

I need to select one polygon from a polygon layer to select line features. is there a way that I can send each polygon into a separate port from where I can connect spatial filter to select lines from each polygon

 


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • August 10, 2022

If you want to find lines that interact with each polygon you can use a spatial relator, build a list and then explode the list. There is no reason to do the spatial comparison polygon by polygon.


fme_can_do_it
Enthusiast
Forum|alt.badge.img+11
  • Author
  • Enthusiast
  • August 10, 2022
ebygomm wrote:

If you want to find lines that interact with each polygon you can use a spatial relator, build a list and then explode the list. There is no reason to do the spatial comparison polygon by polygon.

I have used Spatial Realtor, but I see some lines that lie within the polygon have not been selected. Below is an outputimageimage 

 

 

 

 

 

 


fme_can_do_it
Enthusiast
Forum|alt.badge.img+11
  • Author
  • Enthusiast
  • August 12, 2022
fme_can_do_it wrote:

I have used Spatial Realtor, but I see some lines that lie within the polygon have not been selected. Below is an outputimageimage 

 

 

 

 

 

 

@ebygomm​ When I try to select intersecting lines from overlapping polygons, Spatial Realtor does not give me the results I am looking for. Here is an example:imageRather than populating the Highlands-CCD attributes, it populates the name of the bigger polygon from which the small polygon overlaps.

 

image 

 

 

 


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