Skip to main content

I have two shapefiles populated by polygons, where several polygons of the second (Supplier) shp intersect the first (Requestor). When it does the Spatial relations and merges the attributes I need it to pick of the maximum attribute value of all the polygons that intersect the Requestor. Basically performing the Join attribute function in other softwares by spatial location picking the maximum value of the Supplier polygons intersecting the Requestor polygon, but can't figure out a way to do so. Does anyone know of a way around this? Thanks.

A diagram might help, so I need a transformer that reads that there are three gardens intersecting the property and then to pick up the maximum cost of the garden and merge it into the output attribute list. It's the last bit I'm struggling with.

Hi @patrialvarollop

Enable this option on transformer SpatialRelator:

After use the other transformer StatisticsCalculator to get the max value from _related_candidates.

thanks,

Danilo


Hi @danilo_fme, thanks for the suggestion, but that's not what I meant, that tells me the max number of related candidates. I need it to pick the maximum attribute from the original Supplier, I'll add a comment to make myself clearer.


@patrialvarollop

Have the SpatialRelator generate a list (just under the tip @danilo_fme)

In fme2018 you can choose the attribute you want to list (finally! and tx Safe)

Sort (descending) the list by the attriubute you want to test and use ListIndexer with index = 0 to get the value.

(remove list when you are done)


@patrialvarollop

Have the SpatialRelator generate a list (just under the tip @danilo_fme)

In fme2018 you can choose the attribute you want to list (finally! and tx Safe)

Sort (descending) the list by the attriubute you want to test and use ListIndexer with index = 0 to get the value.

(remove list when you are done)

That worked! Thanks both, @gio, @danilo_fme. Results slightly differ from the outputs I get when I do it in ArcGIS, anyone knows why this could be?
That worked! Thanks both, @gio, @danilo_fme. Results slightly differ from the outputs I get when I do it in ArcGIS, anyone knows why this could be?
How do they differ?

 

One possibility could be that ArcGIS is a little fuzzier in the tolerances for what it considers intersecting. So a garden that almost, but not quite intersects the house would not be considered by FME, but would by ArcGIS.