Hi,
I am to perform a spatial join between a line and a polygon. In some cases the line will be crossing polygon boundaries (there are no spaces between polygons). For these cases, I want to split the line, and find out which segment of the line is longer, then assign that polygon's attribute to the original line.
I've tried used the LineOnAreaOverlayer to split the lines, then using a Matcher to find 'duplicates' (lines that ended up getting split between polygons), and then the LengthCalculator. So I have something pretty close to the end product. I have a match_id value from the matcher so I know which lines belong to eachother (on top of a GlobalID that I'm using in the matcher). The issue I'm facing with this approach is that I do not know how to split these lines apart, or compare them against each other. Maybe I should use a sorter, then some type of filter to split every one feature into different features?