Skip to main content
Solved

Spatial Filter Looping - Creating a feature for every filter it intersects


Hi.

I have a database of roughly a million polygons and I have another dataset of 50 polygons which represent areas of interest. Some of these areas of interest overlap.

I would like to select every feature from the large database that overlaps an area of interest polygon and write these to 50 individual datasets. I tried to set up a loop using a spatial filter. Some screenshots are below

Overlapping areas of interest

Main workbench

Custom transformer

I should let you know I haven't worked with loops before in FME before. I was hoping the first area of interest polygon would enter the filter then the large database would enter the candidate path. It would select the correct polygons. The passed and failed features would enter back through the candidate path and it would perform the same operation on the next filter polygon.

Any help would be greatly appreciated.

Thanks,

Matt

Best answer by takashi

Hi @mattenvsys, why not use the SpatialRelator?

  1. Send the 50 polygons to the Requestor port,
  2. send the areas from the large dataset to the Supplier port,
  3. check the Generate List checkbox,
  4. and select attributes which you want to collect from spatially related suppliers for each requestor.
The SpatialRelator with the setting above collects attributes from all the related suppliers for each requestor and stores them into the list. You can then extract desired attribute values from the list.
View original
Did this help you find an answer to your question?

2 replies

takashi
Influencer
  • Best Answer
  • April 27, 2018

Hi @mattenvsys, why not use the SpatialRelator?

  1. Send the 50 polygons to the Requestor port,
  2. send the areas from the large dataset to the Supplier port,
  3. check the Generate List checkbox,
  4. and select attributes which you want to collect from spatially related suppliers for each requestor.
The SpatialRelator with the setting above collects attributes from all the related suppliers for each requestor and stores them into the list. You can then extract desired attribute values from the list.

  • Author
  • April 30, 2018
takashi wrote:

Hi @mattenvsys, why not use the SpatialRelator?

  1. Send the 50 polygons to the Requestor port,
  2. send the areas from the large dataset to the Supplier port,
  3. check the Generate List checkbox,
  4. and select attributes which you want to collect from spatially related suppliers for each requestor.
The SpatialRelator with the setting above collects attributes from all the related suppliers for each requestor and stores them into the list. You can then extract desired attribute values from the list.
Hi @takashi,

 

 

I used your suggestion and it worked. I finished off the workbench with a ListExploder and FeatureMerger to pull out the features from the large database.

 

 

Thanks for your help!

 

 


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