Skip to main content
Solved

Determine spatial join requestor/supplier based on Feature class feature count

  • September 9, 2019
  • 1 reply
  • 5 views

Forum|alt.badge.img

Hello,

 

 

I am reading in 2 feature classes into a Spatial Realtor transformer. I need to be able to automatically determine which feature class has the higher number of records/features and which has the lower. This will then determine the Requestor (feature class with higher number), and Supplier (feature class with lower number of records) for the Spatial Relator.

 

 

More like an if statement, if feature class A is 10 and feature class B is 5, then connect A to the Spatial Relator requestor, and B to Spatial Relator supplier.

 

I don't want a new attribute to be created within feature class A or B.

 

How can I do this?

Best answer by fmelizard

Hi @ani89 One method is attached here - count each group with a StatisticsCalculator, then get the highest summary feature with a Sorter and Sampler, then merge that to all of the features with a FeatureMerger by the group ID. The Merged features will become the Requestor on the SpatialRelator, and the UnmergedRequestor will be the Supplier features. sort_by_count.fmw

View original
Did this help you find an answer to your question?

1 reply

fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • September 10, 2019

Hi @ani89 One method is attached here - count each group with a StatisticsCalculator, then get the highest summary feature with a Sorter and Sampler, then merge that to all of the features with a FeatureMerger by the group ID. The Merged features will become the Requestor on the SpatialRelator, and the UnmergedRequestor will be the Supplier features. sort_by_count.fmw


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