Skip to main content
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?

 

 

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
Thanks for the tip - works great!

Reply