I have about 2000 line segments that need to be aggregated based on a specific field. First I sort them based on the order they are supposed to be merged in, then I aggregate them if there's more than 1 segment. This results in about 1100 multipart polylines (not all of them are multipart, and some are just made of 1 segment, but others can be made of up to 12 segments).
This works really well for my output data, and the lines are all merged correctly. However, at a closer look, my elevation profiles don't make sense. It appears that even though the segments are in the correct order, some of the segments have a different orientation of their neighboring segment, i.e. one is going North to South, and the next is going South to North. Hopefully the attached diagram can help illustrate this.
I've tried many different transformers to try and fix this without updating the underlying dataset, but I'm not sure if there's a way to fix this in FME? Is my only option to fix the underlying dataset (the 2000 segments) or identify the ones that should be reversed before going into the aggregator?
Currently there is no attribute in the data to say which direction the line is "supposed" to be oriented. I just want the coordinates to be continuous for the elevation profile. Any ideas?