I have the code below which runs a spatial query against an overlaying polygon fc which gains values that are then saved into the new fc. This works fine when the feature is exactly within that fc however when working with lines & poly's quite often these new features go over the overlaying polygon overlay. What are the default rules of logic for the lookup below to use. I need code or be able to modify this so that the line/poly has the majority of it's area in one poly the intersect takes the majority rather than the minority area. Is that possible?
// load the other featureset
var fs = FeatureSetByName($datastore, "Highways.HIGHWAYMGR.ElectoralDivisions")
// get the first feature from fs that intersects the current $feature
var f = First(Intersects(fs, $feature))
// abort if we didn't find something
if(f == null) { return }
// return the intersecting feature's value
return f.ElectDiv