Skip to main content
Question

Spatial Relator/Filter: How to get it to merge the maximum attribute value

  • July 11, 2018
  • 5 replies
  • 142 views

Forum|alt.badge.img

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.

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.

5 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • July 11, 2018

Hi @patrialvarollop

Enable this option on transformer SpatialRelator:

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

thanks,

Danilo


Forum|alt.badge.img

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.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • July 11, 2018

@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)


Forum|alt.badge.img

@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?

jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • July 11, 2018
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.