Skip to main content
Solved

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

  • April 27, 2018
  • 2 replies
  • 143 views

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.
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.

2 replies

takashi
Celebrity
  • 7843 replies
  • 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
  • 19 replies
  • April 30, 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.
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!