Question

Loop through feature class to select polygons

  • 10 August 2022
  • 5 replies
  • 4 views

Badge +8

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

Badge +10

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

Badge +8

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

 

Badge +10

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.

Badge +8

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 

 

 

 

 

 

 

Badge +8

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 

 

 

 

Reply