I don't know if this can be done consistently. But if anyone would know how it would be you.
I would like to connect lines A and B and remove the "appendix" from line C.
An AnchoredSnapper was my first thought, but there are probably plenty of occurrences where B would connect to C instead of A. Is there a way to only snap to something that is in the "forward" perimeter? If I could get the below working it might be a better idea to extend the lines and then cut away the surplus.
Removing the appedix could be done with a LineOnLineOverlayer, but how do I find out which one is the shortest of the resulting lines?
How would you solve this? What is the "cleverest" solution?