Skip to main content
Solved

How to assign merge rules to SpatialFilter ?


makt
Contributor
Forum|alt.badge.img+1
  • Contributor
I am doing a spatial join by intersect of points to areas (joining an attribute of the points to the attribute of areas). SpatialFilter does what I want exept when there is more than one point that intersects an area. The point attribute that is joined seems to be the max of the candidates but I would like the average. 

 

 

I explored all the settings in SpatialFilter and there does not seem to be any parameter that sets the merge rules for this kind of situation. Do I need to bring in another transformer to join the average value rather than the default max value?

 

 

Best answer by takashi

Hi,

 

 

The fundamental functionality of the SpatialFilter is to filter candidate features by spatial relationships to at least one base feature, so it doesn't have options to collect multiple related features and calculate somthing.

 

In your case, consider using the SpatialRelator instead.

 

Send the areas to BASE (Requestor in FME 2014), the point to CANDIDATE (Supplier) port of the SpatialRelator. Output features are area features, each of which will have a structured list attribute named "_relationships" by default. The list contains all attributes of every spatially related points, so you can calculate average of any attribute value base on the list elements. The ListSummer and the ListElementCounter might help you when calculating.

 

 

Takashi
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • May 16, 2014
Hi,

 

 

The fundamental functionality of the SpatialFilter is to filter candidate features by spatial relationships to at least one base feature, so it doesn't have options to collect multiple related features and calculate somthing.

 

In your case, consider using the SpatialRelator instead.

 

Send the areas to BASE (Requestor in FME 2014), the point to CANDIDATE (Supplier) port of the SpatialRelator. Output features are area features, each of which will have a structured list attribute named "_relationships" by default. The list contains all attributes of every spatially related points, so you can calculate average of any attribute value base on the list elements. The ListSummer and the ListElementCounter might help you when calculating.

 

 

Takashi

makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 16, 2014
Thanks for the tip - works great!

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